/* Arthur Berg — site styles */

/* Fully fluid content width — use the viewport, with comfortable side padding */
@media (min-width: 992px) {
  main.content, .page-columns > main {
    max-width: none;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Make tables scroll horizontally on mobile rather than overflow */
.table-responsive, table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Preserve the about page's original table layout */
.about-entity table {
  display: table;
  overflow-x: visible;
}

a {
  color: #043D42;
}

/* ——— Publications styling ——— */

.pub-summary {
  background: linear-gradient(135deg, #043D42 0%, #0a6b72 100%);
  color: #fff;
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  margin: 1rem 0 2rem;
  box-shadow: 0 4px 12px rgba(4, 61, 66, 0.15);
}
.pub-summary a {
  color: #ffe9a8;
  text-decoration: underline;
}
.pub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.pub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.pub-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}
.pub-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

h2.pub-year, h2[class*="pub-year"] {
  color: #043D42;
  border-bottom: 3px solid #e5b845;
  padding-bottom: 0.25rem;
  margin-top: 2.5rem;
}
h3.pub-type, h3[class*="pub-type"] {
  color: #7a5c1f;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1.5rem;
  border-left: 4px solid #e5b845;
  padding-left: 0.6rem;
}

.pub-entry {
  background: #fafbfc;
  border-left: 3px solid #0a6b72;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.pub-entry:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  border-left-color: #e5b845;
  transform: translateX(2px);
}
.pub-meta {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 0.25rem;
}
.pub-me {
  font-weight: 700;
  color: #043D42;
}
.pub-title {
  font-weight: 500;
}
.pub-venue {
  font-style: normal;
  color: #444;
}
.pub-venue em {
  color: #0a6b72;
  font-weight: 500;
}

.pub-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: filter 0.15s ease;
}
.pub-badge:hover { filter: brightness(1.1); }
.pub-pdf  { background: #c53030; color: #fff !important; }
.pub-doi  { background: #2c5282; color: #fff !important; }
.pub-link { background: #4a5568; color: #fff !important; }
.pub-supp { background: #2f855a; color: #fff !important; }

/* Dark theme tweaks */
[data-bs-theme="dark"] .pub-entry {
  background: #1f2526;
  border-left-color: #0a6b72;
}
[data-bs-theme="dark"] .pub-meta { color: #b8b8b8; }
[data-bs-theme="dark"] .pub-me { color: #7fd4d9; }
[data-bs-theme="dark"] .pub-venue { color: #ccc; }
[data-bs-theme="dark"] .pub-venue em { color: #7fd4d9; }
[data-bs-theme="dark"] h2.pub-year,
[data-bs-theme="dark"] h2[class*="pub-year"] { color: #7fd4d9; }
[data-bs-theme="dark"] h3.pub-type,
[data-bs-theme="dark"] h3[class*="pub-type"] { color: #e5b845; }

/* ——— Home highlights grid ——— */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.highlight-card-wide { grid-column: 1 / -1; }
.highlight-card ul { margin: 0; padding-left: 1.25rem; }
.highlight-card li { margin: 0.1rem 0; }
.highlight-card {
  background: linear-gradient(135deg, #f7fafb 0%, #eaf3f4 100%);
  border-left: 4px solid #043D42;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(4, 61, 66, 0.15);
}
.highlight-card h3 {
  color: #043D42;
  font-size: 1.05rem;
  margin: 0 0 0.4rem 0;
  font-weight: 700;
}
.highlight-card h3 .fa, .highlight-card h3 [class*="fa-"] {
  color: #e5b845;
  margin-right: 0.5rem;
}
.highlight-card p { margin: 0; color: #444; }

[data-bs-theme="dark"] .highlight-card {
  background: linear-gradient(135deg, #1f2526 0%, #0f1819 100%);
  border-left-color: #7fd4d9;
}
[data-bs-theme="dark"] .highlight-card h3 { color: #7fd4d9; }
[data-bs-theme="dark"] .highlight-card p { color: #ccc; }

/* ——— Contact cards ——— */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 640px;
}
.contact-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #043D42;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-top-color 0.15s ease;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(4, 61, 66, 0.15);
  border-top-color: #e5b845;
}
.contact-card h3 {
  color: #043D42;
  font-size: 1.15rem;
  margin: 0 0 0.5rem 0;
  border-bottom: none;
  padding-bottom: 0;
}
.contact-card h3 .fa, .contact-card h3 [class*="fa-"] {
  color: #e5b845;
  margin-right: 0.5rem;
}
.contact-card p, .contact-card ul { margin-bottom: 0; }
.contact-card ul { list-style: none; padding-left: 0; }
.contact-card ul li { padding: 0.2rem 0; }
.contact-card a { font-weight: 500; }

[data-bs-theme="dark"] .contact-card {
  background: #1f2526;
  border-color: #333;
  border-top-color: #7fd4d9;
}
[data-bs-theme="dark"] .contact-card h3 { color: #7fd4d9; }

/* ——— CV contact card ——— */
.cv-contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  background: linear-gradient(135deg, #f7fafb 0%, #eaf3f4 100%);
  border-left: 4px solid #043D42;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
}
.cv-contact-block p { margin: 0 0 0.75rem 0; line-height: 1.55; }
.cv-contact-block strong { color: #043D42; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cv-contact-block strong i { color: #e5b845; margin-right: 0.4rem; }
.cv-contact-block a { font-weight: 500; }
[data-bs-theme="dark"] .cv-contact-card {
  background: linear-gradient(135deg, #1f2526 0%, #0f1819 100%);
  border-left-color: #7fd4d9;
}
[data-bs-theme="dark"] .cv-contact-block strong { color: #7fd4d9; }

/* ——— CV page styling ——— */

/* Section headers */
#quarto-document-content h2,
main.content h2:not(.pub-year) {
  color: #043D42;
  border-bottom: 3px solid #e5b845;
  padding-bottom: 0.25rem;
  margin-top: 2.5rem;
}
main.content h3 {
  color: #0a6b72;
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

/* Colorful tables */
main.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}
main.content table thead th {
  background: #043D42;
  color: #fff;
  padding: 0.6rem 0.8rem;
  text-align: left;
  border: none;
}
main.content table tbody tr:nth-child(even) {
  background: #f7fafb;
}
main.content table tbody tr:hover {
  background: #eaf3f4;
}
main.content table tbody td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
}

/* Dark-theme tables + headings */
[data-bs-theme="dark"] main.content h2:not(.pub-year) { color: #7fd4d9; }
[data-bs-theme="dark"] main.content h3 { color: #9ee0e5; }
[data-bs-theme="dark"] main.content table thead th { background: #0a6b72; }
[data-bs-theme="dark"] main.content table tbody tr:nth-child(even) { background: #1f2526; }
[data-bs-theme="dark"] main.content table tbody tr:hover { background: #2a3334; }
[data-bs-theme="dark"] main.content table tbody td { border-bottom-color: #333; }

/* ——— News listing grid ——— */
.quarto-listing-default .listing-item,
.quarto-grid-item {
  border-left: 3px solid #043D42 !important;
  border-radius: 0 8px 8px 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.quarto-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(4, 61, 66, 0.15);
  border-left-color: #e5b845 !important;
}
.quarto-grid-item .listing-title,
.quarto-grid-item a {
  color: #043D42;
  font-weight: 600;
}
.quarto-grid-item .listing-categories .listing-category {
  background: #e5b845;
  color: #043D42;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.25rem;
}
.quarto-grid-item .listing-date {
  color: #7a5c1f;
  font-weight: 600;
  font-size: 0.85rem;
}
[data-bs-theme="dark"] .quarto-grid-item {
  background: #1f2526;
  border-left-color: #7fd4d9 !important;
}
[data-bs-theme="dark"] .quarto-grid-item .listing-title,
[data-bs-theme="dark"] .quarto-grid-item a { color: #7fd4d9; }
[data-bs-theme="dark"] .quarto-grid-item .listing-date { color: #e5b845; }

.btn-primary {
  background-color: #043D42;
  border-color: #043D42;
}

.btn-primary:hover {
  background-color: #065b62;
  border-color: #065b62;
}
