/* Custom styles for Aston Academic Site */

/* Page background */
body {
  background-color: #3B3B3B;
  color: #f0f0f0;
}

/* Nav links white */
.navbar-nav .nav-link {
  color: #ffffff !important;
}

/* Hero section */
.hero {
  background-color: #3B3B3B;
  color: white;
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0;
  }
}

/* Profile layout: mobile stacks photo → text → demo */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Photo floats left at all sizes */
.profile-photo-wrap {
  float: left;
  width: 130px;
  margin: 0 1.25rem 0.75rem 0;
}
.profile-text { overflow: hidden; }

/* Desktop: 2 columns — text+photo (float) left, demo right */
@media (min-width: 992px) {
  .profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "text demo";
    gap: 2rem;
    align-items: start;
  }
  .profile-text { grid-area: text; }
  .profile-demo { grid-area: demo; }
}

.profile-photo {
  width: 130px;
  height: 170px;
  object-fit: cover;
  border-radius: 4px;
}

.hero h1 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero .lead {
  opacity: 0.9;
}

/* Word Cloud */
.wordcloud-card {
  background: beige;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  color: #3B3B3B;
}

/* Sentiment Demo */
.demo-card {
  background: #808080;
  border-radius: 1rem;
  padding: 1.5rem;
  color: #ffffff;
}

#demo-input {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 0.5rem;
  min-height: 100px;
  resize: vertical;
}

#demo-input:focus {
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#analyze-btn {
  background: #ff8c00;
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  color: #000000;
}

#analyze-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
  background: #e67e00;
}

#analyze-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Result display */
.result-container {
  margin-top: 0.75rem;
  min-height: 40px;
}

.result-box {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

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

.result-positive {
  background: rgba(40, 167, 69, 0.9);
}

.result-negative {
  background: rgba(220, 53, 69, 0.9);
}

.result-label {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.result-confidence {
  font-size: 0.9rem;
  opacity: 0.9;
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #ffffff;
}

.loading-indicator .spinner-border {
  width: 1.25rem;
  height: 1.25rem;
}

/* Section cards */
.section-card {
  border: none;
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-card .card-body {
  padding: 2rem;
}

.section-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #0f3460;
}

.section-card .card-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-card .btn {
  margin-top: 1rem;
  background-color: #ff8c00;
  border: none;
  color: #000000;
  font-weight: 500;
}

.section-card .btn:hover {
  background-color: #e67e00;
  border: none;
  color: #000000;
}

/* Page headers */
.page-header {
  background: #000000;
  color: white;
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ff8c00;
}

/* Orange headings on dark background sections */
.container h2,
.container h3,
.container h4 {
  color: #ff8c00;
}

/* Hyperlink colours — light pink on dark/grey backgrounds, blue on white */
a:not(.btn):not(.nav-link) {
  color: #ffb3c1;
}

a:not(.btn):not(.nav-link):hover {
  color: #ff85a1;
}

/* Inside white-background cards, revert to standard blue */
.card a:not(.btn) {
  color: #0d6efd;
}

.card a:not(.btn):hover {
  color: #0a58ca;
}

/* Utility */
.text-gradient {
  background: linear-gradient(90deg, #e94560, #0f3460);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Cards - white background, black text */
.card {
  background-color: #ffffff;
  border-color: #dddddd;
  color: #000000;
}

.card-title {
  color: #000000;
}

/* FAQ Accordion - dark theme */
.accordion-item {
  background-color: #4a4a4a;
  border-color: #5a5a5a;
}

.accordion-button {
  background-color: #4a4a4a;
  color: #f0f0f0;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: #555555;
  color: #ff8c00;
  box-shadow: none;
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.3);
}

.accordion-body {
  background-color: #4a4a4a;
  color: #f0f0f0;
}

/* Blockquote styling */
.blockquote-footer {
  color: #aaaaaa;
  margin-top: 0.5rem;
}

/* Publications */
.pub-item {
  line-height: 1.5;
}

.pub-item:last-child {
  border-bottom: none !important;
}

.pub-title {
  color: #f0f0f0;
}

.pub-year {
  color: #ffffff;
}

.pub-authors {
  color: #ffffff;
}

.pub-author-self {
  color: #ffe680;
  font-weight: 500;
}

.pub-link {
  color: #ff8c00;
  text-decoration: none;
}

.pub-link:hover {
  color: #ffad40;
  text-decoration: underline;
}

.pub-doi-link {
  color: #aaaaaa;
  text-decoration: none;
  word-break: break-all;
}

.pub-doi-link:hover {
  color: #ff8c00;
}

/* Type badges */
.pub-badge-journal      { background-color: #0d6efd; color: #fff; }
.pub-badge-conference   { background-color: #198754; color: #fff; }
.pub-badge-book_chapter { background-color: #6f42c1; color: #fff; }
.pub-badge-book         { background-color: #dc3545; color: #fff; }
.pub-badge-misc         { background-color: #6c757d; color: #fff; }

/* Publication view tabs */
#pubViewTabs .nav-link {
  color: #aaaaaa;
  border-color: #555;
  background-color: transparent;
}

#pubViewTabs .nav-link.active {
  color: #ff8c00;
  background-color: #3B3B3B;
  border-color: #555 #555 #3B3B3B;
}

#pubViewTabs .nav-link:hover:not(.active) {
  color: #f0f0f0;
  border-color: #666;
}

/* Search input */
.pub-search-input {
  background-color: #2a2a2a;
  color: #f0f0f0;
  border-color: #555;
}

.pub-search-input::placeholder {
  color: #888;
}

.pub-search-input:focus {
  background-color: #2a2a2a;
  color: #f0f0f0;
  border-color: #ff8c00;
  box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
}

/* DOI / Link / PDF action buttons (top-right of each entry) */
.pub-action-btn {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  color: #aaaaaa;
  border-color: #666;
  background: transparent;
}

.pub-action-btn:hover {
  color: #ff8c00;
  border-color: #ff8c00;
  background: transparent;
}

.pub-pdf-btn {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  background-color: #ff8c00;
  border-color: #ff8c00;
  color: #000;
}

.pub-pdf-btn:hover {
  background-color: #e67e00;
  border-color: #e67e00;
  color: #000;
}

/* Abstract / BibTeX / APA7 toggle buttons */
.pub-toggle-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  color: #aaaaaa;
  border-color: #666;
  background: transparent;
}

.pub-toggle-btn:hover,
.pub-toggle-btn[aria-expanded="true"] {
  color: #ff8c00;
  border-color: #ff8c00;
  background: transparent;
}

/* Collapse panels */
.pub-collapse {
  margin-top: 0.5rem;
}

.pub-collapse-body {
  background: #2a2a2a;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: #e0e0e0;
}

.pub-code {
  background: transparent;
  color: #f0f0f0;
  font-size: 0.8rem;
  margin-bottom: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Copy button */
.pub-copy-btn {
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  color: #aaaaaa;
  border-color: #666;
  background: transparent;
}

.pub-copy-btn:hover {
  color: #ff8c00;
  border-color: #ff8c00;
  background: transparent;
}

/* Mobile improvements */
@media (max-width: 767.98px) {
  .demo-card {
    padding: 1rem;
  }

  .section-cards .col {
    margin-bottom: 1rem;
  }
}
