/* ═══════════════════════════════════════════════ */
/* PAGINA PROJECT — Custom Styles                  */
/* ═══════════════════════════════════════════════ */

/* Smooth scroll for the whole page */
html {
  scroll-behavior: smooth;
}

/* Warm paper-like background texture */
body {
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(8, 104, 178, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(220, 0, 45, 0.02) 0%, transparent 50%);
}

/* ─── Navigation ─────────────────────────────── */

#navbar.scrolled > div {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* ─── Floating Animations ────────────────────── */

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(12deg); }
  50% { transform: translateY(-12px) rotate(12deg); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(-6deg); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 7s ease-in-out infinite;
  animation-delay: 1s;
}

#hero h1 .underline-text {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ─── Demo Slider ────────────────────────────── */

#demo-slider {
  touch-action: pan-y;
}

@keyframes catch-attention {
  0%, 20%, 100% {

    background-color: #ffffff;
    /* box-shadow: 0 0 0 0 #0868b2; */
  }
  10% {
    background-color: #97d2ff;
    /* box-shadow: 0 0 10px 0 rgba(8, 104, 178, 0.2); */
  }
}




.animate-slider-handle {
  animation: catch-attention 10s ease-in-out infinite; 
  /* animation-delay: 3s; */
}

/* ─── Tag System (Standardized Colors) ───────── */

.tag-pill[data-tag="NLP"] {
  background-color: rgba(8, 104, 178, 0.1);
  color: #0868b2;
}
.tag-pill[data-tag="readability"] {
  background-color: rgba(220, 0, 45, 0.1);
  color: #dc002d;
}
.tag-pill[data-tag="linguistics"] {
  background-color: rgba(13, 148, 136, 0.1);
  color: #0d9488;
}
.tag-pill[data-tag="case-study"] {
  background-color: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

/* Tag filter buttons */
.tag-filter {
  border-color: rgba(0,0,0,0.1);
  color: #4a4a4a;
  background: white;
}

.tag-filter:hover {
  border-color: #0868b2;
  color: #0868b2;
}

.tag-filter.active {
  background: #0868b2;
  border-color: #0868b2;
  color: white;
}

/* Filtered card transitions */
.pub-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pub-card.hidden-card {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ─── Scroll Reveal ──────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.reveal.visible .stagger-child {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Selection Color ────────────────────────── */

::selection {
  background-color: rgba(8, 104, 178, 0.15);
  color: inherit;
}

/* ─── Scrollbar Styling (subtle) ─────────────── */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F9F7F2;
}

::-webkit-scrollbar-thumb {
  background: rgba(8, 104, 178, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 104, 178, 0.35);
}

/* ─── Focus Styles (accessibility) ───────────── */

a:focus-visible,
button:focus-visible {
  outline: 2px solid #0868b2;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Mobile Menu Animation ──────────────────── */

#mobile-menu {
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.open {
  max-height: 400px;
}

/* ─── Timeline connector on mobile ───────────── */

@media (max-width: 767px) {
  #updates .relative > .absolute.left-2\.5 {
    left: 0.625rem;
  }
}

/* ─── Utilities (small, framework-free) ───────── */

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Events horizontal rail */
.events-rail {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 104, 178, 0.25) rgba(249, 247, 242, 0.8);
}

/* Event card hover/focus polish */
.event-card {
  outline: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(8, 104, 178, 0.25);
}

.event-card:focus-visible {
  border-color: rgba(8, 104, 178, 0.6);
  box-shadow: 0 0 0 3px rgba(8, 104, 178, 0.18);
}

.event-card__media img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.event-card:hover .event-card__media img,
.event-card:focus-visible .event-card__media img {
  transform: scale(1.05);
}

.events-rail::-webkit-scrollbar {
  height: 10px;
}

.events-rail::-webkit-scrollbar-track {
  background: rgba(249, 247, 242, 0.8);
  border-radius: 999px;
}

.events-rail::-webkit-scrollbar-thumb {
  background: rgba(8, 104, 178, 0.25);
  border-radius: 999px;
}

.events-rail::-webkit-scrollbar-thumb:hover {
  background: rgba(8, 104, 178, 0.38);
}

/* ─── People cards (per-person accents + partner logo) ─── */

.person-card {
  position: relative;
  overflow: hidden;
}

.person-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent, #0868b2);
  opacity: 0.9;
}

.person-card .initials,
.person-card .person-role {
  color: var(--accent, #0868b2);
}

.person-partner-logo {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  object-fit: contain;
  /* opacity: 0.45; */
  /* filter: grayscale(1) contrast(1.05); */
  pointer-events: none;
}

/* ─── News read-more overlay ─── */

body.news-modal-open {
  overflow: hidden;
}

.news-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.news-modal.hidden {
  display: none;
}

.news-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.news-modal__panel {
  position: relative;
  width: min(900px, 100%);
  height: 100%;
  overflow: auto;
  background: #ffffff;
  border-left: 1px solid rgba(0,0,0,0.08);
  border-right: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 0 80px rgba(0,0,0,0.28);
  margin: 0 auto;
}

@media (min-width: 640px) {
  .news-modal {
    padding: 24px 0;
  }

  .news-modal__panel {
    height: auto;
    min-height: 100%;
    max-height: 100%;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.08);
    width: min(900px, calc(100% - 48px));
  }
}

.news-modal__media {
  position: relative;
  height: 260px;
  background: #F9F7F2;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

@media (min-width: 640px) {
  .news-modal__media {
    height: 300px;
  }
}

.news-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-modal__img-ph {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(8, 104, 178, 0.12), transparent 55%),
    radial-gradient(ellipse at 85% 30%, rgba(220, 0, 45, 0.10), transparent 50%),
    linear-gradient(180deg, rgba(249,247,242,1), rgba(240,237,230,1));
}

.news-modal__img-ph-inner {
  position: absolute;
  left: 18px;
  bottom: 16px;
  right: 18px;
}

.news-modal__img-ph-bar {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(8, 104, 178, 0.65);
}

.news-modal__img-ph-title {
  margin-top: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: #1a1a1a;
}

.news-modal__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px 24px;
  background: rgba(249, 247, 242, 0.92);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(10px);
}

@media (min-width: 640px) {
  .news-modal__header {
    padding: 28px 36px 22px 36px;
  }
}

.news-modal__meta-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.news-modal__title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: #1a1a1a;
  margin: 0;
}

@media (min-width: 640px) {
  .news-modal__title {
    font-size: 28px;
  }
}

.news-modal__meta {
  margin-top: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4a4a;
}

.news-modal__dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
}

.news-modal__close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #ffffff;
  color: #1a1a1a;
  font-size: 22px;
  line-height: 1;
}

.news-modal__close:hover {
  border-color: rgba(8, 104, 178, 0.45);
  color: #0868b2;
}

.news-modal__body {
  padding: 22px 24px;
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.75;
}

@media (min-width: 640px) {
  .news-modal__body {
    padding: 28px 36px;
    font-size: 16px;
    line-height: 1.8;
  }
}

.news-modal__summary {
  margin: 0;
  color: #1a1a1a;
  font-weight: 600;
  line-height: 1.55;
}

.news-modal__divider {
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 14px 0;
}

.news-modal__p {
  margin: 0;
}

.news-modal__p + .news-modal__p {
  margin-top: 14px;
}

.news-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px 24px;
}

@media (min-width: 640px) {
  .news-modal__actions {
    padding: 0 36px 36px;
  }
}

.news-modal__slides-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #0868b2;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.news-modal__slides-btn:hover {
  background: #065a96;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(8, 104, 178, 0.3);
}

.news-modal__slides-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
