/* ==========================================================================
   CUSTOM DESIGN SYSTEM
   Refined academic minimalism
   Typography: Literata (display) + Plus Jakarta Sans (body)
   Palette: Deep slate + warm teal accent
   ========================================================================== */

:root {
  --c-slate: #1a2332;
  --c-slate-light: #2d3a4a;
  --c-teal: #0d7377;
  --c-teal-light: #0f9296;
  --c-sienna: #b5412e;
  --c-sienna-bg: rgba(181, 65, 46, 0.06);
  --c-text: #3d4654;
  --c-text-muted: #6b7280;
  --c-bg-warm: #faf9f7;
  --c-bg-card: #ffffff;
  --c-border: #e5e3de;
  --c-border-light: #eeedea;
  --font-display: 'Literata', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* --- Global --- */

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg-warm);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(13, 115, 119, 0.15);
}

/* --- Layout Alignment --- */

#main {
  margin-top: 1.5em;
}

.page,
.archive {
  padding-right: 0 !important;
}

/* --- Masthead --- */

.masthead {
  border-bottom: none !important;
  background: var(--c-bg-warm) !important;
  box-shadow: 0 1px 0 var(--c-border);
}

.masthead__menu-item a {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.88em;
  color: var(--c-text-muted) !important;
  transition: color 0.2s ease;
}

.masthead__menu-item a:hover {
  color: var(--c-slate) !important;
}

.masthead__menu-item--lg a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05em;
  color: var(--c-slate) !important;
  letter-spacing: -0.02em;
}

/* --- Sidebar / Author Profile --- */

.author__avatar img {
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
}

.author__name {
  font-family: var(--font-display) !important;
  font-weight: 700;
  color: var(--c-slate);
  letter-spacing: -0.01em;
}

.author__bio {
  font-family: var(--font-body);
  color: var(--c-text-muted);
  font-size: 0.88em;
  line-height: 1.5;
}

.author__urls a {
  color: var(--c-text-muted) !important;
  font-family: var(--font-body);
  font-size: 0.9em;
  transition: color 0.2s ease;
}

.author__urls a:hover {
  color: var(--c-teal) !important;
}

/* --- Page Content --- */

.page__content {
  font-family: var(--font-body);
}

.page__content > p:first-of-type {
  font-size: 0.93em;
  line-height: 1.7;
  color: var(--c-text);
}

.page__content p {
  font-size: 0.91em;
  line-height: 1.7;
  color: var(--c-text);
}

.page__content a {
  color: var(--c-teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 115, 119, 0.25);
  transition: border-color 0.2s ease;
}

.page__content a:hover {
  border-bottom-color: var(--c-teal);
}

.page__content strong {
  font-weight: 600;
  color: var(--c-slate);
}

/* --- Section Headings --- */

.page__content h2 {
  font-family: var(--font-body);
  font-size: 0.92em;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2.6em;
  margin-bottom: 0.8em;
  padding-bottom: 0.5em;
  border-top: none !important;
  border-bottom: none !important;
  position: relative;
}

.page__content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--c-teal);
  border-radius: 1px;
}

.page__content h2::before {
  content: none !important;
}

.page__content h2:first-of-type {
  margin-top: 1.4em;
}

/* --- Page Title --- */

.page__title {
  font-family: var(--font-display) !important;
  font-weight: 700;
  color: var(--c-slate);
  letter-spacing: -0.02em;
}

/* --- News Section --- */

.news-item {
  display: flex;
  align-items: baseline;
  padding: 0.4em 0 0.4em 0.9em;
  margin-bottom: 0.3em;
  font-size: 0.88em;
  line-height: 1.55;
  border-left: 3px solid var(--c-teal);
}

.news-date {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--c-text-muted);
  min-width: 7em;
  font-size: 0.84em;
  margin-right: 0;
  white-space: nowrap;
  letter-spacing: 0;
}

/* --- Paper Entries (Homepage) --- */

.papers-list {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  margin: 0;
  padding: 0;
}

.papers-list > * {
  margin: 0 !important;
  padding: 0 !important;
}

.paper-entry {
  padding: 0.3em 0 !important;
  border-bottom: 1px solid var(--c-border-light);
}

.paper-entry:last-child {
  border-bottom: none;
  padding-bottom: 0 !important;
}

.paper-conference-badge {
  display: inline-block;
  background: none;
  color: var(--c-teal);
  padding: 0;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35em;
}

.paper-title {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 600;
  color: var(--c-slate);
  margin-bottom: 0.35em;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.paper-title a {
  color: inherit !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

.paper-authors {
  margin-bottom: 0.25em;
  font-size: 0.84em;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.paper-authors strong {
  color: var(--c-slate);
  font-weight: 600;
}

.paper-venue {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--c-text-muted);
  margin-bottom: 0.5em;
  font-size: 0.82em;
  line-height: 1.4;
}

.paper-highlight {
  color: var(--c-text-muted);
  font-weight: 400;
  font-size: 0.82em;
  margin-bottom: 0.5em;
  padding: 0;
  background: none;
  border-radius: 0;
  border-left: none;
  line-height: 1.5;
  font-style: italic;
}

.paper-buttons {
  margin-top: 0.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.paper-buttons a {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.75em;
  background: transparent;
  color: var(--c-teal) !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  border: 1px solid var(--c-border);
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.paper-buttons a:hover {
  background: var(--c-teal);
  color: white !important;
  border-color: var(--c-teal);
}

/* --- Publications Page --- */

.publications-container {
  max-width: 780px;
}

.publication-group {
  margin-bottom: 2.2em;
}

.publication-group-label {
  font-family: var(--font-body);
  font-size: 0.92em;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  position: relative;
}

.publication-group-label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--c-teal);
  border-radius: 1px;
}

.publication-entry {
  margin-bottom: 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--c-border-light);
  line-height: 1.6;
}

.publication-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.publication-title {
  font-family: var(--font-display);
  font-size: 1.02em;
  font-weight: 600;
  margin-bottom: 0.4em;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.publication-title a {
  color: var(--c-slate);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.publication-title a:hover {
  border-bottom-color: var(--c-teal);
  color: var(--c-slate);
}

.publication-authors {
  color: var(--c-text-muted);
  margin-bottom: 0.3em;
  font-size: 0.88em;
  line-height: 1.5;
}

.publication-authors strong {
  color: var(--c-slate);
  font-weight: 600;
}

.publication-venue {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--c-text-muted);
  font-size: 0.84em;
  margin-bottom: 0.6em;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-top: 0.1em;
}

.publication-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.75em;
  background: transparent;
  color: var(--c-teal) !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  border: 1px solid var(--c-border);
  transition: all 0.15s ease;
}

.publication-links a:hover {
  background: var(--c-teal);
  color: white !important;
  border-color: var(--c-teal);
}

/* --- Teaching Page --- */

.teaching-list {
  margin-top: 0.6em;
}

.teaching-entry {
  margin-bottom: 1.8em;
}

.teaching-course {
  font-family: var(--font-display);
  font-size: 0.95em;
  font-weight: 600;
  color: var(--c-slate);
  margin-bottom: 0.15em;
}

.teaching-details {
  font-size: 0.88em;
  color: var(--c-text);
  margin-bottom: 0.1em;
}

.teaching-instructor {
  font-size: 0.84em;
  color: var(--c-text-muted);
  font-style: italic;
}

/* --- Footer --- */

.page__footer {
  background: var(--c-bg-warm) !important;
  border-top: 1px solid var(--c-border);
}

.page__footer footer {
  font-family: var(--font-body);
  color: var(--c-text-muted);
  font-size: 0.84em;
}

/* --- Entrance Animations --- */

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

.news-item {
  animation: fadeIn 0.35s ease both;
}

.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }

.paper-entry {
  animation: fadeIn 0.35s ease both;
  animation-delay: 0.12s;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-date {
    margin-bottom: 0.15em;
    min-width: auto;
  }

  .paper-buttons,
  .publication-links {
    flex-direction: column;
    gap: 0.35em;
  }

  .paper-buttons a,
  .publication-links a {
    text-align: center;
    justify-content: center;
  }
}
