/* Copied and adapted from horwitz.ai/spectral_detuning index.css for layout parity */
/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #22c55e; /* green */
  --primary-hover: #16a34a; /* darker green */
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-subtle: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.button { border-radius: var(--border-radius) !important; font-weight: 600 !important; transition: var(--transition) !important; border: 2px solid transparent !important; position: relative; overflow: hidden; }
.button.is-dark { background: var(--primary-color) !important; border: none !important; color: white !important; box-shadow: var(--shadow-md); }
.button.is-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--primary-hover) !important; }
.button.is-dark:active { transform: translateY(0); box-shadow: var(--shadow-md); }

.link-block a { margin: 8px 4px; }

.hero { position: relative; overflow: hidden; }
.hero.is-light { background: var(--background-secondary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.hero-body { padding: 4rem 1.5rem; }
.teaser .hero-body { padding-top: 2rem; padding-bottom: 4rem; }

.publication-title { font-family: 'Inter', sans-serif !important; font-weight: 800 !important; color: var(--text-primary) !important; margin-bottom: 2rem !important; line-height: 1.1 !important; }
.grad { background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.publication-header .hero-body { padding: 6rem 1.5rem 4rem; }
.publication-authors { font-family: 'Inter', sans-serif !important; font-weight: 500; margin-bottom: 1.5rem; }
.publication-venue, .publication-awards { width: fit-content; padding: 0.5rem 1rem; border-radius: var(--border-radius); margin-top: 1rem; display: inline-block; }
.publication-venue { color: var(--text-secondary); font-weight: 600; background: var(--background-accent); }
.publication-awards { color: #ef4444; font-weight: 700; background: linear-gradient(135deg, #fef2f2, #fee2e2); border-left: 4px solid #ef4444; }
.publication-authors a { color: var(--primary-color) !important; text-decoration: none !important; font-weight: 600; transition: var(--transition); position: relative; }
.publication-authors a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; left: 0; background: var(--gradient-accent); transition: var(--transition); }
.publication-authors a:hover::after { width: 100%; }
.publication-authors a:hover { color: var(--primary-hover) !important; }
.author-block { display: inline-block; margin-right: 0.5rem; }
.affiliations-list { margin-top: .75rem; padding-left: 0; list-style: none; counter-reset: aff; color: var(--text-secondary); }
.affiliations-list li { margin: .15rem 0; counter-increment: aff; }
.affiliations-list li::before { content: counter(aff); font-size: .75em; vertical-align: super; margin-right: .35rem; color: var(--text-secondary); }

.publication-body img { border-radius: var(--border-radius); box-shadow: var(--shadow-md); transition: var(--transition); }
.publication-body img:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.center-image{ display: block; margin-left: auto; margin-right: auto; }

/* BibTeX */
pre { background: var(--background-accent) !important; border: 1px solid var(--border-color) !important; border-radius: var(--border-radius) !important; padding: 1.5rem !important; font-size: 0.9rem !important; overflow-x: auto; box-shadow: var(--shadow-sm); }
code { background: var(--background-accent) !important; color: var(--text-primary) !important; font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important; }
.bibtex-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.copy-bibtex-btn { background: var(--primary-color); color: white; border: none; border-radius: var(--border-radius); padding: 0.75rem 1rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 0.5rem; }
.copy-bibtex-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.copy-bibtex-btn.copied { background: #10b981; }
.copy-bibtex-btn.copied .copy-text::after { content: "ied!"; }

/* Scroll to top */
.scroll-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; background: var(--primary-color); color: white; border: none; border-radius: 50%; cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: var(--shadow-lg); }
.scroll-to-top::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; background: rgba(34, 197, 94, 0.12); }
.scroll-to-top:hover { background: var(--primary-hover); transform: translateY(-3px); box-shadow: var(--shadow-xl); }
.scroll-to-top.visible { opacity: 1; visibility: visible; }

/* More works dropdown */
.more-works-container { position: fixed; top: 2rem; right: 2rem; z-index: 1000; }
.more-works-btn { background: var(--background-primary); color: var(--text-primary); border: 2px solid var(--border-color); border-radius: var(--border-radius-lg); padding: 0.75rem 1.25rem; font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-md); transition: var(--transition); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'Inter', sans-serif; }
.more-works-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--background-secondary); border-color: var(--primary-color); }
.more-works-btn .dropdown-arrow { transition: var(--transition); font-size: 0.8rem; }
.more-works-btn.active .dropdown-arrow { transform: rotate(180deg); }
.more-works-dropdown { position: absolute; top: calc(100% + 0.5rem); right: 0; width: 400px; max-width: 90vw; background: var(--background-primary); border: 1px solid var(--border-color); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-xl); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition); max-height: 70vh; overflow-y: auto; }
.more-works-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid var(--border-color); }
.dropdown-header h4 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.close-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 0.5rem; border-radius: var(--border-radius); transition: var(--transition); }
.close-btn:hover { background: var(--background-accent); color: var(--text-primary); }
.works-list { padding: 1rem; }
.work-item { display: flex; align-items: flex-start; justify-content: space-between; padding: 1rem; border-radius: var(--border-radius); text-decoration: none; color: inherit; transition: var(--transition); margin-bottom: 0.5rem; }
.work-item:hover { background: var(--background-accent); transform: translateX(4px); }
.work-info h5 { margin: 0 0 0.5rem 0; font-size: 1rem; font-weight: 500; color: var(--text-primary); }
.work-venue { font-size: 0.8rem; color: var(--text-light); font-style: italic; }
.work-item .fas { color: var(--text-light); font-size: 0.9rem; margin-top: 0.2rem; flex-shrink: 0; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px);} to { opacity: 1; transform: translateY(0);} }
.hero, .section { animation: fadeInUp 0.6s ease-out; }

/* Responsive tweaks */
@media screen and (max-width: 768px) {
  .hero-body { padding: 2.5rem 1rem; }
  .button { margin: 0.25rem !important; font-size: 0.875rem !important; padding: 0.75rem 1rem !important; }
  .more-works-container { bottom: 2rem; right: 1rem; top: auto; }
  .more-works-btn { padding: 0.6rem 1rem; font-size: 0.8rem; }
  .more-works-dropdown { width: calc(100vw - 2rem); right: -1rem; bottom: calc(100% + 0.5rem); top: auto; }
}
@media screen and (max-width: 480px) {
  .publication-title { font-size: 2rem !important; }
  .hero-body { padding: 1.5rem 0.75rem; }
  .more-works-container { position: fixed; bottom: 2rem; right: 1rem; z-index: 1000; }
  .more-works-btn { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
  .more-works-dropdown { position: absolute; bottom: calc(100% + 0.5rem); right: 0; width: calc(100vw - 2rem); max-width: 90vw; }
  .link-block { display: block; margin-bottom: 0.5rem; }
  .button { width: 100%; justify-content: center; }
}
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-body { padding: 3rem 2rem; }
  .publication-header .hero-body { padding: 4rem 2rem 3rem; }
}
