/* ===== CSS VARIABLES (Dark-first, shared with main site) ===== */
:root {
   --bg-primary: #0a0a0f;
   --bg-secondary: #12121a;
   --bg-card: rgba(18, 18, 26, 0.8);
   --text-primary: #e4e4e7;
   --text-secondary: #a1a1aa;
   --text-muted: #71717a;
   --accent-cyan: #06b6d4;
   --accent-purple: #8b5cf6;
   --accent-amber: #f59e0b;
   --border-color: rgba(255, 255, 255, 0.08);
   --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
   --glass-bg: rgba(18, 18, 26, 0.6);
   --glass-border: rgba(255, 255, 255, 0.06);
   --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
   --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
   --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
   --bg-primary: #f8fafc;
   --bg-secondary: #ffffff;
   --bg-card: rgba(255, 255, 255, 0.9);
   --text-primary: #0f172a;
   --text-secondary: #475569;
   --text-muted: #94a3b8;
   --border-color: rgba(0, 0, 0, 0.08);
   --glass-bg: rgba(255, 255, 255, 0.7);
   --glass-border: rgba(0, 0, 0, 0.06);
}

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

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

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

.pub-container {
   max-width: 800px;
   margin: 0 auto;
   padding: 0 24px;
}

/* Header */
.pub-header {
   position: sticky;
   top: 0;
   z-index: 10;
   background: var(--glass-bg);
   -webkit-backdrop-filter: blur(16px);
   backdrop-filter: blur(16px);
   border-bottom: 1px solid var(--glass-border);
}

.pub-header-inner {
   max-width: 800px;
   margin: 0 auto;
   padding: 16px 24px;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
   flex-wrap: wrap;
}

.logo {
   font-family: var(--font-mono);
   font-size: 1.1rem;
   font-weight: 700;
   letter-spacing: -0.5px;
}

.logo span { color: var(--accent-cyan); }

.back-link {
   font-size: 0.85rem;
   font-weight: 500;
   color: var(--text-secondary);
   display: inline-flex;
   align-items: center;
   gap: 6px;
   transition: color var(--transition);
}

.back-link:hover { color: var(--accent-cyan); }

/* Main */
.pub-main {
   flex: 1;
   padding: 64px 0;
}

.pub-meta-top {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-bottom: 20px;
   font-family: var(--font-mono);
}

.pub-year-badge {
   font-size: 0.75rem;
   font-weight: 700;
   color: var(--accent-amber);
   border: 1px solid var(--accent-amber);
   border-radius: 999px;
   padding: 4px 12px;
}

.pub-venue-name {
   font-size: 0.8rem;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 1px;
}

.pub-page-title {
   font-size: clamp(1.6rem, 4vw, 2.4rem);
   font-weight: 800;
   line-height: 1.3;
   letter-spacing: -0.5px;
   margin-bottom: 20px;
}

.pub-page-author {
   font-size: 1rem;
   color: var(--text-secondary);
   margin-bottom: 8px;
}

.pub-page-author a {
   color: var(--accent-cyan);
   transition: color var(--transition);
}

.pub-page-author a:hover { text-decoration: underline; }

.pub-page-citation {
   font-size: 0.95rem;
   color: var(--text-muted);
   font-style: italic;
   margin-bottom: 40px;
}

.btn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 12px 28px;
   border-radius: 12px;
   font-weight: 600;
   font-size: 0.95rem;
   transition: all var(--transition);
   cursor: pointer;
   border: none;
}

.btn-primary {
   background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
   color: #fff;
   box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
   transform: translateY(-2px);
   box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

/* Footer */
.pub-footer {
   padding: 24px 0;
   border-top: 1px solid var(--border-color);
   text-align: center;
}

.pub-footer p {
   font-size: 0.85rem;
   color: var(--text-muted);
}

.pub-footer a {
   color: var(--accent-cyan);
}

.pub-footer a:hover { text-decoration: underline; }
