/* ============================================
   ScholarNet — Main Stylesheet
   Inspired by ResearchGate's clean academic design
   ============================================ */

/* --- Variables --- */
:root {
    --primary: #00A651;
    --primary-dark: #008C45;
    --primary-light: #E8F5E9;
    --accent: #2196F3;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg: #FFFFFF;
    --bg-alt: #F8F9FA;
    --bg-dark: #2C3E50;
    --border: #E0E0E0;
    --border-light: #F0F0F0;
    --error: #E53935;
    --success: #43A047;
    --warning: #FB8C00;
    --verified: #00A651;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 6px;
    --radius-lg: 12px;
    --font: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg-alt); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* --- Typography --- */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }

/* --- Buttons --- */
.btn {
    display: inline-block; padding: 8px 20px; font-size: 0.9rem; font-weight: 600;
    border: 2px solid transparent; border-radius: var(--radius); cursor: pointer;
    text-align: center; transition: all 0.2s; font-family: var(--font); text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 32px; font-size: 1rem; }
.btn-block { width: 100%; display: block; }

/* --- Forms --- */
.form-control {
    width: 100%; padding: 10px 14px; font-size: 0.9rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: #fff; font-family: var(--font);
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,166,81,0.1); }
.form-control-lg { padding: 14px 18px; font-size: 1.05rem; }
textarea.form-control { resize: vertical; }
select.form-control { appearance: auto; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; display: block; }
.form-row { display: flex; gap: 1rem; }
.form-row .flex-1 { flex: 1; }
.form-card { background: #fff; padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* --- Alerts --- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #FFEBEE; color: var(--error); border: 1px solid #FFCDD2; }
.alert-success { background: #E8F5E9; color: var(--success); border: 1px solid #C8E6C9; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 1.25rem; font-weight: 700; }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.main-nav { display: flex; gap: 4px; }
.nav-link {
    color: rgba(255,255,255,0.85); padding: 8px 16px; border-radius: var(--radius);
    font-weight: 500; font-size: 0.9rem; transition: all 0.2s;
}
.nav-link:hover { background: rgba(255,255,255,0.15); color: #fff; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.header-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.header-actions .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }

/* User menu */
.user-menu-wrapper { position: relative; }
.user-menu-toggle { color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 0.9rem; }
.user-menu-toggle:hover { text-decoration: none; }
.user-avatar-small {
    width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.user-dropdown {
    position: absolute; right: 0; top: 100%; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); min-width: 200px; padding: 8px 0; z-index: 200;
}
.user-dropdown a {
    display: block; padding: 8px 16px; color: var(--text); font-size: 0.9rem;
}
.user-dropdown a:hover { background: var(--bg-alt); text-decoration: none; }
.user-dropdown hr { margin: 4px 0; }

/* Notifications */
.notif-wrapper { position: relative; }
.notif-bell { color: #fff; font-size: 1.2rem; position: relative; }
.notif-bell:hover { text-decoration: none; }
.notif-badge {
    position: absolute; top: -6px; right: -8px; background: var(--error); color: #fff;
    font-size: 0.7rem; min-width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.notif-dropdown {
    position: absolute; right: -20px; top: 100%; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); width: 360px; max-height: 400px; overflow-y: auto; z-index: 200;
}
.notif-header {
    display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.notif-list .notif-item {
    padding: 10px 16px; border-bottom: 1px solid var(--border-light); font-size: 0.85rem;
    cursor: pointer;
}
.notif-list .notif-item:hover { background: var(--bg-alt); }
.notif-list .notif-item.unread { background: #E8F5E9; }
.notif-list .notif-item:hover span[onclick*="deleteNotification"] { color: #E53935; background: #FFEBEE; }

/* Verified Badge */
.verified-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--verified); color: #fff; border-radius: 50%;
    width: 18px; height: 18px; font-size: 11px; font-weight: 700;
    margin-left: 4px; vertical-align: middle;
}
.verified-lg { width: 24px; height: 24px; font-size: 14px; }

/* ============================================
   HERO
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #00C853 100%);
    color: #fff; padding: 80px 0 100px; text-align: center;
}
.hero h1 { font-size: 2.2rem; max-width: 700px; margin: 0 auto 1rem; color: #fff; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.hero-search { max-width: 600px; margin: 0 auto; }
.search-form-hero { display: flex; gap: 8px; }
.search-input-hero {
    flex: 1; padding: 14px 18px; font-size: 1rem; border: none; border-radius: var(--radius);
    font-family: var(--font);
}
.search-input-hero:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 60px 0; }
.section-alt { background: #fff; }
.section-title { font-size: 1.5rem; margin-bottom: 0.25rem; }
.section-subtitle { color: var(--text-light); margin-bottom: 2rem; }
.section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.section-cta { background: var(--bg-dark); color: #fff; padding: 80px 0; }
.section-cta h2 { color: #fff; font-size: 1.75rem; margin-bottom: 1.5rem; }

/* --- Fields Grid --- */
.fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.fields-grid-top { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.field-card {
    background: #fff; padding: 1.5rem; border-radius: var(--radius-lg); text-align: center;
    box-shadow: var(--shadow); transition: all 0.2s; color: var(--text);
}
.field-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.field-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.field-name { font-size: 1rem; margin-bottom: 0.25rem; }
.field-desc { font-size: 0.8rem; color: var(--text-muted); }

/* --- Field Hero --- */
.field-hero { background: var(--primary); color: #fff; padding: 3rem 0; text-align: center; }
.field-hero-icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.field-hero h1 { font-size: 2rem; color: #fff; }
.field-hero p { color: rgba(255,255,255,0.9); max-width: 600px; margin: 0.5rem auto 0; }

/* ============================================
   PUBLICATION CARDS & LIST
   ============================================ */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.pub-card {
    background: #fff; padding: 1.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}
.pub-card:hover { box-shadow: var(--shadow-lg); }
.pub-type-badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.75rem;
    font-weight: 600; background: var(--primary-light); color: var(--primary); text-transform: capitalize;
}
.pub-title { margin: 0.5rem 0 0.25rem; }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--primary); }
.pub-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; gap: 8px; }
.pub-author { font-weight: 500; }
.pub-abstract { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.75rem; }
.pub-stats { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 16px; }

.pub-list-item {
    display: flex; gap: 1rem; padding: 1.25rem; background: #fff; border-radius: var(--radius);
    margin-bottom: 0.75rem; box-shadow: var(--shadow);
}
.pub-list-type {
    writing-mode: vertical-lr; text-orientation: mixed; font-size: 0.75rem; font-weight: 600;
    color: var(--primary); text-transform: uppercase; padding: 0 4px;
}
.pub-list-content { flex: 1; }
.pub-list-content h3 { margin-bottom: 0.25rem; }
.pub-list-content h3 a { color: var(--text); }
.pub-list-content h3 a:hover { color: var(--primary); }
.pub-list-meta { font-size: 0.85rem; color: var(--text-light); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 0.5rem; }
.pub-list-abstract { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; }
.pub-list-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.5rem; }
.pub-list-stats { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 16px; }

/* Tags */
.tag {
    display: inline-block; padding: 2px 10px; background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: 20px; font-size: 0.75rem; color: var(--text-light);
}
.tag:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; border-color: var(--primary); }

/* Publication detail */
.pub-detail-header { display: flex; gap: 8px; margin-bottom: 1rem; align-items: center; }
.pub-field-badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem;
    font-weight: 600; color: #fff;
}
.pub-author-card { display: flex; align-items: center; gap: 12px; margin: 1.5rem 0; padding: 1rem; background: var(--bg-alt); border-radius: var(--radius); }
.author-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem;
    flex-shrink: 0;
}
.author-info { flex: 1; }
.author-name { font-weight: 600; color: var(--text); }
.author-name:hover { color: var(--primary); }
.author-affiliation { font-size: 0.85rem; color: var(--text-light); }
.pub-date { font-size: 0.85rem; color: var(--text-muted); }
.pub-stats-bar { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.5rem; }
.pub-section { margin-bottom: 2rem; }
.pub-section h2 { border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.pub-content { white-space: pre-wrap; line-height: 1.8; }
.pub-files { display: flex; flex-wrap: wrap; gap: 12px; }
.file-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    background: var(--bg-alt); border-radius: var(--radius); border: 1px solid var(--border);
    font-size: 0.85rem; color: var(--text);
}
.file-link:hover { border-color: var(--primary); text-decoration: none; }
.repo-link { font-size: 0.9rem; word-break: break-all; }
.citation-list { padding-left: 1.5rem; }
.citation-list li { margin-bottom: 0.75rem; font-size: 0.9rem; line-height: 1.5; }

/* Comments */
.comment-form { margin-bottom: 1.5rem; }
.comment-form textarea { margin-bottom: 0.5rem; }
.comments-list { display: flex; flex-direction: column; gap: 0.75rem; }
.comment {
    padding: 1rem; background: var(--bg-alt); border-radius: var(--radius);
    border-left: 3px solid var(--border);
}
.comment-header { display: flex; gap: 8px; align-items: center; margin-bottom: 0.5rem; font-size: 0.85rem; }
.comment-date { color: var(--text-muted); }

/* ============================================
   QUESTION CARDS
   ============================================ */
.question-list, .question-list-home { display: flex; flex-direction: column; gap: 0.75rem; }
.question-card {
    display: flex; gap: 0; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.q-votes, .q-answers {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 1rem; min-width: 70px; font-size: 0.95rem;
}
.q-votes { background: var(--bg-alt); }
.q-answers { background: var(--bg-alt); border-left: 1px solid var(--border); }
.q-answers.has-answers { background: var(--primary-light); color: var(--primary); }
.q-vote-count, .q-answer-count { font-weight: 700; font-size: 1.1rem; }
.q-vote-label, .q-answer-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.q-content { flex: 1; padding: 1rem 1.25rem; }
.q-content h3 { margin-bottom: 0.25rem; }
.q-content h3 a { color: var(--text); }
.q-content h3 a:hover { color: var(--primary); }
.q-body-preview { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; max-height: 40px; overflow: hidden; }
.q-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 0.25rem; }
.q-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.question-card-sm { padding: 1rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 0.5rem; }
.question-card-sm h3 { font-size: 1rem; }

/* Question detail */
.q-detail-header { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.q-detail-body-row { display: flex; gap: 1.5rem; margin: 1.5rem 0; }
.vote-controls { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vote-btn {
    background: none; border: 1px solid var(--border); width: 36px; height: 30px; border-radius: 4px;
    cursor: pointer; font-size: 1rem; color: var(--text-muted); transition: all 0.2s;
}
.vote-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.vote-count { font-weight: 700; font-size: 1.2rem; }
.q-detail-body { flex: 1; }
.q-body-text { line-height: 1.8; margin-bottom: 1rem; white-space: pre-wrap; }
.q-author-card { display: flex; align-items: center; gap: 12px; padding: 0.75rem; background: var(--bg-alt); border-radius: var(--radius); margin-bottom: 0.75rem; }
.q-date { font-size: 0.85rem; color: var(--text-muted); margin-left: auto; }
.q-stats { font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 16px; }

/* Answers */
.answers-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.answer { display: flex; gap: 1.5rem; padding: 1.25rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.answer-accepted { border-left: 4px solid var(--success); }
.answer-body { flex: 1; }
.answer-text { line-height: 1.8; margin-bottom: 1rem; white-space: pre-wrap; }
.accepted-mark { color: var(--success); font-size: 1.5rem; font-weight: 700; margin-top: 4px; }
.answer-form-section { margin-top: 2rem; }
.answer-form-section h3 { margin-bottom: 1rem; }
.answer-form-section textarea { margin-bottom: 1rem; }

/* ============================================
   JOB CARDS
   ============================================ */
.job-list { display: flex; flex-direction: column; gap: 0.75rem; }
.job-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.job-card:hover { box-shadow: var(--shadow-lg); }
.job-card-main h3 { margin-bottom: 0.25rem; }
.job-card-main h3 a { color: var(--text); }
.job-card-main h3 a:hover { color: var(--primary); }
.job-meta { font-size: 0.85rem; color: var(--text-light); display: flex; flex-wrap: wrap; gap: 12px; }
.job-type-badge {
    display: inline-block; padding: 2px 8px; background: #E3F2FD; color: #1565C0;
    border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize;
}
.job-salary { font-size: 0.85rem; color: var(--success); font-weight: 500; margin-top: 4px; }
.job-card-side { text-align: right; flex-shrink: 0; }
.job-posted { font-size: 0.8rem; color: var(--text-muted); }
.job-deadline { font-size: 0.8rem; color: var(--warning); font-weight: 500; }

/* Job detail */
.job-detail-header { display: flex; gap: 8px; margin-bottom: 1rem; }
.job-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 1.5rem 0; font-size: 0.95rem; }
.job-info-item { display: flex; align-items: center; gap: 4px; }
.job-posted-by { display: flex; align-items: center; gap: 8px; margin-bottom: 2rem; font-size: 0.9rem; }
.job-description { margin-bottom: 2rem; }
.job-desc-text { line-height: 1.8; white-space: pre-wrap; }
.job-actions { display: flex; gap: 12px; }

/* ============================================
   PROFILE
   ============================================ */
.profile-header { display: flex; gap: 2rem; padding: 2rem 0; }
.profile-avatar-large {
    width: 100px; height: 100px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 700;
    flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-info h1 { display: flex; align-items: center; gap: 8px; }
.profile-affiliation { font-size: 1rem; color: var(--text-light); margin-bottom: 0.25rem; }
.profile-field { font-weight: 500; margin-bottom: 0.5rem; }
.profile-bio { color: var(--text-light); margin-bottom: 0.75rem; }
.profile-stats { display: flex; gap: 24px; margin-bottom: 0.5rem; }
.profile-joined { font-size: 0.85rem; color: var(--text-muted); }
.profile-section { margin-bottom: 2rem; }
.affiliations-list { display: flex; flex-direction: column; gap: 0.5rem; }
.affiliation-item { padding: 0.75rem; background: var(--bg-alt); border-radius: var(--radius); }
.aff-dept { color: var(--text-light); margin-left: 8px; }
.aff-years { color: var(--text-muted); font-size: 0.85rem; margin-left: 8px; }

/* Tabs */
.profile-tabs, .field-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
    padding: 10px 24px; background: none; border: none; font-size: 0.95rem; font-weight: 500;
    color: var(--text-light); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.2s; font-family: var(--font);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--primary); }

/* ============================================
   SEARCH
   ============================================ */
.search-form-advanced { margin-bottom: 2rem; }
.search-results { display: flex; flex-direction: column; gap: 0.75rem; }
.search-result-item {
    padding: 1.25rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.search-result-type { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.25rem; }
.search-result-item h3 { margin-bottom: 0.25rem; }
.search-result-item h3 a { color: var(--text); }
.search-result-item h3 a:hover { color: var(--primary); }
.search-result-meta { font-size: 0.85rem; color: var(--text-light); display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 0.5rem; }
.search-result-item p { font-size: 0.85rem; color: var(--text-light); }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.5rem; align-items: center; }
.filter-input { max-width: 300px; }
.filter-input-sm { max-width: 120px; }
.filter-select { max-width: 180px; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 2rem; }
.page-btn {
    padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; font-family: var(--font);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================
   AUTH
   ============================================ */
.auth-section { display: flex; justify-content: center; padding: 60px 20px; }
.auth-card {
    background: #fff; padding: 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 440px;
}
.auth-card h1 { text-align: center; margin-bottom: 0.5rem; }
.auth-subtitle { text-align: center; color: var(--text-light); margin-bottom: 1.5rem; }
.auth-alt { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page-content { padding: 2rem 0; }
.page-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.empty-state { text-align: center; color: var(--text-muted); font-size: 1.1rem; padding: 3rem 0; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; margin-bottom: 0.75rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.6); margin-bottom: 0.5rem; font-size: 0.85rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-col p { font-size: 0.85rem; }

/* Footer fields - using batch in template */
.footer-show-more {
    background: none; border: none; color: var(--primary); cursor: pointer;
    font-size: 0.85rem; padding: 0; margin-top: 4px;
}
.footer-show-more:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; text-align: center; font-size: 0.8rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .main-nav { order: 3; width: 100%; justify-content: center; }
    .hero h1 { font-size: 1.5rem; }
    .fields-grid { grid-template-columns: repeat(2, 1fr); }
    .fields-grid-top { grid-template-columns: repeat(2, 1fr); }
    .pub-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-input, .filter-input-sm, .filter-select { max-width: 100%; }
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .q-detail-body-row { flex-direction: column; }
    .job-card { flex-direction: column; }
    .search-form-hero { flex-direction: column; }
}

/* --- Citation statistics (profile page) --- */
.cite-summary { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0 8px; }
.cite-card {
    flex: 1; min-width: 140px; background: var(--bg-alt, #f7f7f7);
    border: 1px solid var(--border, #e0e0e0); border-radius: 8px; padding: 16px; text-align: center;
}
.cite-num { font-size: 1.8rem; font-weight: 700; color: var(--primary, #00A651); }
.cite-label { font-size: 0.82rem; color: var(--text-muted, #777); margin-top: 4px; }

.cite-bargraph {
    display: flex; align-items: flex-end; gap: 8px; min-height: 180px;
    padding: 16px 8px 0; overflow-x: auto; border-bottom: 2px solid var(--border, #e0e0e0);
}
.cite-bar-col { display: flex; flex-direction: column; align-items: center; min-width: 36px; flex: 1; }
.cite-bar-value { font-size: 0.75rem; color: var(--text-muted, #777); margin-bottom: 4px; }
.cite-bar {
    width: 70%; min-height: 2px; background: var(--primary, #00A651);
    border-radius: 3px 3px 0 0; transition: height 0.3s ease;
}
.cite-bar-year { font-size: 0.72rem; color: var(--text-muted, #777); margin-top: 6px; transform: rotate(-45deg); white-space: nowrap; }

.cite-category-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cite-cat-row { display: flex; align-items: center; gap: 12px; }
.cite-cat-name { flex: 0 0 160px; font-size: 0.88rem; text-align: right; color: var(--text, #333); }
.cite-cat-track { flex: 1; background: var(--bg-alt, #eee); border-radius: 10px; height: 18px; overflow: hidden; }
.cite-cat-fill { height: 100%; background: var(--primary, #00A651); border-radius: 10px; }
.cite-cat-count { flex: 0 0 auto; font-size: 0.85rem; font-weight: 600; color: var(--text-muted, #555); min-width: 40px; }

.cite-article-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.cite-article-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--bg-alt, #f7f7f7); border-radius: 6px;
}
.cite-article-main { display: flex; flex-direction: column; }
.cite-article-date { font-size: 0.78rem; color: var(--text-muted, #777); margin-top: 2px; }
.cite-article-count { font-size: 0.85rem; font-weight: 600; color: var(--primary, #00A651); white-space: nowrap; }
.cite-article-block { background: var(--bg-alt, #f7f7f7); border-radius: 6px; }
.cite-article-toggle {
    width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left;
    font: inherit; color: inherit;
}
.cite-article-toggle[aria-expanded="true"] { border-radius: 6px 6px 0 0; }
.cite-incoming-wrap { padding: 0 14px 12px; }
.cite-incoming-list { margin: 0; padding-left: 1.1rem; }
.cite-incoming-item { margin: 6px 0; }

/* --- Citation picker (shared: new-article form + edit-article modal) --- */
.citation-search-results {
    border: 1px solid var(--border); border-radius: 4px; margin-top: 4px;
    max-height: 280px; overflow-y: auto; background: #fff;
}
.citation-result-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border); }
.citation-result-item:last-child { border-bottom: none; }
.citation-result-item:hover { background: var(--bg-alt, #f5f5f5); }
.citation-result-item strong { display: block; font-size: 0.9rem; }
.citation-result-meta { font-size: 0.78rem; color: var(--text-muted); }
.citation-result-empty { padding: 8px 12px; color: var(--text-muted); font-size: 0.85rem; }
.selected-citations { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected-citation-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    background: var(--bg-alt, #eef); border: 1px solid var(--border); border-radius: 16px; font-size: 0.82rem;
}
.selected-citation-chip button {
    background: none; border: none; cursor: pointer; font-size: 1rem;
    color: var(--text-muted); line-height: 1; transition: color 0.15s;
}
.selected-citation-chip button:hover { color: var(--error, #e53935); }

/* --- Author profile links in listings --- */
.author-link { color: inherit; text-decoration: none; font-weight: 600; }
.author-link:hover { color: var(--primary, #00A651); text-decoration: underline; }

/* --- Site branding logo --- */
.logo-img { height: 36px; width: auto; max-width: 180px; object-fit: contain; display: block; }

/* ============================================
   HOMEPAGE V2 + NEW PAGES
   ============================================ */

/* Shared section helpers */
.section-eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: 0.08em;
    font-size: 0.78rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem;
}
.section-eyebrow.light { color: #bff0d5; }
.section-title-lg { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.75rem; }
.section-heading-center { text-align: center; max-width: 680px; margin: 0 auto 2.5rem; }
.section-subtitle { color: var(--text-light); font-size: 1.05rem; }

/* --- Hero v2 --- */
.hero-v2 {
    background: linear-gradient(135deg, #063d29 0%, #00A651 55%, #17c46a 100%);
    color: #fff; padding: 4rem 0 4.5rem; position: relative; overflow: hidden;
}
.hero-v2::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15), transparent 45%);
    pointer-events: none;
}
.hero-v2-inner {
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
    position: relative; z-index: 1;
}
.hero-eyebrow {
    display: inline-block; background: rgba(255,255,255,0.18); padding: 5px 14px;
    border-radius: 30px; font-size: 0.8rem; font-weight: 600; margin-bottom: 1rem;
    backdrop-filter: blur(4px);
}
.hero-v2-title { font-size: 2.9rem; font-weight: 800; line-height: 1.12; margin-bottom: 1.25rem; color: #fff; }
.hero-highlight { color: #ffe08a; }
.hero-v2-sub { font-size: 1.15rem; line-height: 1.6; color: rgba(255,255,255,0.92); max-width: 540px; margin-bottom: 1.75rem; }
.hero-v2-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-v2-actions .btn-primary { background: #fff; color: var(--primary); border-color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.hero-v2-actions .btn-primary:hover { background: #ffe08a; border-color: #ffe08a; color: #063d29; }
.hero-v2-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,0.7); }
.hero-v2-actions .btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.hero-v2-trust { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.9rem; color: rgba(255,255,255,0.9); }

.hero-v2-media { position: relative; min-height: 320px; }
.hero-img {
    position: absolute; border-radius: var(--radius-lg); background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px);
    border: 1px solid rgba(255,255,255,0.25); box-shadow: var(--shadow-lg);
}
.hero-img-emoji { font-size: 5rem; }
.hero-img-1 { width: 62%; height: 240px; top: 0; left: 0; z-index: 2; }
.hero-img-2 { width: 52%; height: 200px; bottom: 0; right: 0; z-index: 1; }
.hero-badge-float {
    position: absolute; background: #fff; color: var(--text); font-size: 0.82rem; font-weight: 600;
    padding: 8px 14px; border-radius: 30px; box-shadow: var(--shadow-lg); z-index: 3;
}
.hero-badge-a { top: 30%; right: 2%; }
.hero-badge-b { bottom: 8%; left: 4%; }

/* --- Stats strip --- */
.stats-strip { background: #fff; border-bottom: 1px solid var(--border); }
.stats-strip-inner { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 1rem; padding: 1.5rem 0; }
.stat-pill { text-align: center; }
.stat-pill strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-pill span { font-size: 0.85rem; color: var(--text-light); }

/* --- Home About --- */
.home-about-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }
.home-about-text p { color: var(--text-light); margin-bottom: 1rem; font-size: 1.02rem; }
.home-about-media { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-photo {
    border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--primary-light), #d7f0e1);
    display: flex; align-items: center; justify-content: center; font-size: 3rem; aspect-ratio: 1;
    box-shadow: var(--shadow);
}
.about-photo-1 { grid-row: span 2; aspect-ratio: auto; }
.home-about-media .about-photo-3 { display: none; }

/* --- How it works --- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step-card {
    background: #fff; border-radius: var(--radius-lg); padding: 2rem 1.5rem; text-align: center;
    box-shadow: var(--shadow); position: relative; transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}
.step-icon { font-size: 2.5rem; margin: 0.5rem 0 0.75rem; }
.step-card h3 { margin-bottom: 0.5rem; }
.step-card p { color: var(--text-light); font-size: 0.9rem; }

/* ============================================
   RESEARCHERS / AUTHORS PAGE
   ============================================ */
.researchers-hero {
    background: linear-gradient(135deg, #063d29, #00A651); color: #fff; padding: 2.5rem 0;
}
.researchers-hero h1 { font-size: 2rem; }
.researchers-hero p { color: rgba(255,255,255,0.9); max-width: 620px; }
.researchers-controls {
    display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; background: #fff;
    padding: 1rem; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.researchers-controls input, .researchers-controls select { flex: 1; min-width: 150px; }
.researchers-controls input { flex: 2; min-width: 200px; }
.researchers-count { color: var(--text-light); font-size: 0.9rem; margin-bottom: 1rem; }
.researchers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.researcher-card {
    background: #fff; border-radius: var(--radius-lg); padding: 1.5rem; text-align: center;
    box-shadow: var(--shadow); position: relative; color: var(--text); display: block;
    transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--border-light);
}
.researcher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.researcher-rank {
    position: absolute; top: 12px; left: 12px; background: var(--primary-light); color: var(--primary-dark);
    font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 20px;
}
.researcher-avatar {
    width: 72px; height: 72px; border-radius: 50%; margin: 0.5rem auto 0.75rem;
    background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700; overflow: hidden;
}
.researcher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.researcher-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.researcher-aff { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.5rem; }
.researcher-field { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; margin-bottom: 0.5rem; }
.researcher-bio { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.75rem; }
.researcher-stats { display: flex; justify-content: center; gap: 1.5rem; border-top: 1px solid var(--border-light); padding-top: 0.75rem; }
.researcher-stats strong { display: block; font-size: 1.15rem; color: var(--primary); }
.researcher-stats span { font-size: 0.72rem; color: var(--text-muted); }
.researcher-links { margin-top: 0.6rem; display: flex; gap: 6px; justify-content: center; }
.mini-badge { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.mini-badge.scholar { background: #e8f0fe; color: #1a73e8; }
.mini-badge.orcid { background: #eafae1; color: #a6ce39; }

/* --- Profile research links --- */
.profile-research-links { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0; }
.research-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 30px;
    font-size: 0.85rem; font-weight: 600; border: 1px solid var(--border); background: #fff; color: var(--text);
}
.research-link:hover { text-decoration: none; box-shadow: var(--shadow); }
.scholar-link { color: #1a73e8; border-color: #1a73e8; }
.orcid-link { color: #a6ce39; border-color: #a6ce39; }
.orcid-link .rl-icon { background: #a6ce39; color: #fff; border-radius: 3px; padding: 0 4px; font-weight: 700; font-size: 0.7rem; }

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-hero { background: linear-gradient(135deg, #063d29, #00A651); color: #fff; padding: 3.5rem 0; text-align: center; }
.about-hero h1 { font-size: 2.4rem; max-width: 820px; margin: 0.5rem auto 1rem; }
.about-hero p { color: rgba(255,255,255,0.9); max-width: 640px; margin: 0 auto; font-size: 1.1rem; }
.about-body { max-width: 960px; }
.about-intro { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 2rem; align-items: center; margin-bottom: 2.5rem; }
.about-intro-text p { color: var(--text-light); }
.about-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.about-photo-grid .about-photo { font-size: 2.5rem; }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.about-card { background: #fff; border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow); text-align: center; }
.about-card-icon { font-size: 2.25rem; margin-bottom: 0.5rem; }
.about-card p { color: var(--text-light); font-size: 0.92rem; }
.about-why { margin-bottom: 3rem; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.why-item { display: flex; gap: 1rem; align-items: flex-start; }
.why-icon { font-size: 1.75rem; flex-shrink: 0; }
.why-item h4 { margin-bottom: 0.25rem; }
.why-item p { color: var(--text-light); font-size: 0.9rem; }
.about-connections { background: var(--primary-light); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 3rem; }
.about-connections p { color: var(--text); font-size: 1.02rem; }
.about-cta { text-align: center; padding: 2rem 0; }
.about-cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: start; }
.contact-intro h1 { font-size: 2rem; margin-bottom: 1rem; }
.contact-intro p { color: var(--text-light); margin-bottom: 1.5rem; }
.contact-points { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-point { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.contact-point span { font-size: 1.25rem; }
.contact-form-card { background: #fff; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-page { max-width: 820px; }
.legal-page h1 { font-size: 2rem; margin-bottom: 0.25rem; }
.legal-page h2 { font-size: 1.2rem; margin-top: 1.75rem; margin-bottom: 0.5rem; color: var(--primary-dark); }
.legal-page p, .legal-page li { color: var(--text-light); margin-bottom: 0.75rem; }
.legal-page ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.legal-updated { color: var(--text-muted); font-size: 0.85rem; font-style: italic; }
.legal-disclaimer { margin-top: 2rem; padding: 1rem; background: var(--bg-alt); border-left: 3px solid var(--warning); font-size: 0.85rem; border-radius: var(--radius); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
    .hero-v2-inner { grid-template-columns: 1fr; }
    .hero-v2-media { min-height: 260px; margin-top: 1.5rem; }
    .hero-v2-title { font-size: 2.2rem; }
    .home-about-inner { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr 1fr; }
    .about-intro { grid-template-columns: 1fr; }
    .about-cards { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .steps-grid { grid-template-columns: 1fr; }
    .hero-v2-title { font-size: 1.8rem; }
}

/* --- Profile header: Scholar metrics panel (right end of name row) --- */
.profile-header { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.profile-header .profile-info { flex: 1 1 320px; min-width: 280px; }
.profile-metrics-panel {
    flex: 0 0 auto; width: 300px; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); margin-left: auto;
}
.pmp-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.pmp-src { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); }
.pmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pmp-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 6px; border-bottom: 1px solid var(--border-light); padding-bottom: 4px; }
.pmp-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; padding: 3px 0; }
.pmp-row span { color: var(--text-light); }
.pmp-row strong { color: var(--primary); font-size: 1rem; }
.scholar-source-note { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 720px) {
    .profile-metrics-panel { width: 100%; margin-left: 0; }
}

/* --- Email verification banner + verify page --- */
.email-verify-banner {
    background: #FFF8E1; border-bottom: 1px solid #FFE082; color: #7a5c00;
    padding: 10px 20px; font-size: 0.88rem; display: flex; align-items: center;
    gap: 12px; flex-wrap: wrap; justify-content: center;
}
.email-verify-banner button {
    background: var(--primary); color: #fff; border: none; border-radius: 4px;
    padding: 4px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.email-verify-banner button:hover { background: var(--primary-dark); }
#verifyBannerMsg { color: var(--success); font-weight: 600; }

.verify-card {
    max-width: 520px; margin: 3rem auto; background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 3rem 2rem; text-align: center;
}
.verify-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.verify-card h1 { margin-bottom: 0.75rem; }
.verify-card p { color: var(--text-light); margin-bottom: 1.5rem; }
.verify-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.verify-resend-msg { display: block; width: 100%; margin-top: 1rem; font-weight: 600; }

/* --- Citations admin refresh bar --- */
.citations-admin-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--primary-light); border: 1px solid #c8e6d3; border-radius: var(--radius);
    padding: 10px 14px; margin-bottom: 16px; font-size: 0.88rem;
}
#refreshScholarMsg { font-weight: 600; }
