/* === Publications: layout + theme class overrides === */

/* Publication rows — single-column so action buttons sit underneath titles/authors */
.pub-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding: 0.9rem 0;
  border: none;
  background: transparent;
}

.pub-meta { min-width: 0; }
.pub-title { margin: 0 0 0.25rem 0; font-size: 1.05rem; font-weight: 700; line-height:1.25; }
.pub-title a { color: var(--text); text-decoration: none; }
/* .pub-title a:hover, .pub-title a:focus { color: var(--link); transform: translateY(-1px); } */

.pub-citation { color: var(--text); font-size: 0.98rem; margin-bottom: 0.25rem; }
.pub-venue { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; }

.pub-actions { display:flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.pub-links { display:flex; gap: 0.5rem; flex-wrap:wrap; align-items:center; }
.pub-link {
  background: var(--button-bg);
  color: var(--text);
  /* padding: 0.35rem 0.55rem; */
  /* border-radius: 10px; */
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 22px var(--shadow);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pub-link:hover, .pub-link:focus { box-shadow: 0 14px 30px var(--shadow); }

/* Year heading */
.pub-year {
  font-size: 1.35rem; margin-top: 1.75rem; margin-bottom: 0.6rem;
  color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 0.4rem;
}

/* Theme variables (add to your root / theme blocks) */
:root {
  --button-bg: #f7f7f7;                 /* light button background */
  --button-bg-hover: transparent;       /* keep hover bg subtle by default */
  --border: rgba(0,0,0,0.12);           /* visible on light bg */
  --link: #2991b2;                      /* example link/accent color */
  --text: #0f172a;
}
[data-theme="dark"] {
  --button-bg: #101114;                 /* dark button background */
  --button-bg-hover: rgba(255,255,255,0.02);
  --border: rgba(255,255,255,0.12);     /* visible on dark bg */
  --link: #2991b2;                      /* slightly different for dark if desired */
  --text: #e6eef8;
}

/* Flat, theme-aware pub-link; overrides previous styles */
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  padding: 0.36rem 0.6rem;          /* tweak to taste */
  background: transparent;
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: 0;                 /* flat rectangular corners */
  box-shadow: none;                 /* remove floating shadow for flat look */

  font-weight: 700;
  font-size: 0.68rem;
  text-decoration: none;

  transition: color .12s ease, background .12s ease, border-color .12s ease;
}

/* Hover / focus: change to link color, no translate, no shadow */
.pub-link:hover,
.pub-link:focus {
  color: var(--link);
  border-color: var(--link);
  background: var(--button-bg-hover);
  box-shadow: none;
  transform: none;                  /* ensure no translate/position shift */
  outline: none;                    /* keep custom focus below */
}

.pub-link:focus {
  color: var(--text);
  border-color: var(--border);
  background: transparent;
  box-shadow: none;
}

/* Keep a visible focus ring for keyboard users (accessible) */
.pub-link:focus-visible {
  outline: 3px solid rgba(59,130,246,0.25);
  outline-offset: 2px;
}


/* On very wide screens make a 2-column layout but keep buttons under meta visually */
/* @media (min-width: 920px) {
  .pub-row { grid-template-columns: 1fr 260px; gap: 1rem; align-items: start; }
  .pub-actions { align-items: end; } 
  .pub-abstract { grid-column: 1 / -1; }
} */

/* Accessibility */
/* .pub-link:focus { outline: 3px solid rgba(59,130,246,0.25); outline-offset: 2px; } */
