/*
Theme Name: BCINF Lab
Author: Jose (BCINF Lab)
Version: 1.0
Text Domain: bcinf-lab
*/

:root {
  --container: 1220px;
  --gap: 24px;
  --radius: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --surface: #f6efe2;
  --surface-2: #fffaf1;
  --surface-3: rgba(255, 251, 242, 0.9);
  --surface-4: rgba(246, 239, 226, 0.78);
  --ink: #1e1a15;
  --muted: #665d51;
  --line: rgba(84, 69, 50, 0.16);
  --accent: #9a4d30;
  --accent-dark: #713621;
  --accent-2: #274b5b;
  --accent-2-soft: #dce8ec;
  --success: #305942;
  --shadow-lg: 0 26px 80px rgba(31, 24, 19, 0.12);
  --shadow-md: 0 18px 46px rgba(31, 24, 19, 0.09);
  --shadow-sm: 0 10px 24px rgba(31, 24, 19, 0.07);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(167, 90, 57, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(39, 75, 91, 0.14), transparent 24%),
    linear-gradient(180deg, #f2e8d9 0%, #f7f2e7 26%, #fcfaf4 100%);
  font-family: "Source Sans 3", "Trebuchet MS", sans-serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.36) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.4), transparent 72%);
  pointer-events: none;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.24s ease, border-color 0.24s ease, background-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(154, 77, 48, 0.28);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 30px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(84, 69, 50, 0.1);
  background: rgba(252, 249, 242, 0.82);
  backdrop-filter: blur(18px);
}

.site-header-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 50%, rgba(154, 77, 48, 0.12), transparent 20%),
    radial-gradient(circle at 84% 18%, rgba(39, 75, 91, 0.12), transparent 20%);
  opacity: 0.9;
}

.site-header-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 88px;
}

.site-branding {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.site-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 2.6vw, 2.85rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.035em;
}

.site-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  justify-self: end;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(84, 69, 50, 0.16);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.menu-toggle-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-toggle-box {
  display: inline-grid;
  gap: 4px;
}

.menu-toggle-box span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

body.nav-open .menu-toggle-box span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .menu-toggle-box span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle-box span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-header-tools {
  position: relative;
  z-index: 1;
}

.site-header-tools-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.site-nav .menu,
.fallback-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav li {
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: var(--accent);
  background: rgba(154, 77, 48, 0.08);
}

.language-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(84, 69, 50, 0.18);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.language-link.is-current,
.language-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.site-nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 24;
  border: 0;
  padding: 0;
  background: rgba(16, 13, 10, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

body.nav-open .site-nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

.site-main {
  min-height: 68vh;
}

.hero {
  padding-top: 30px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.page-intro,
.hero-panel,
.hero-side-card,
.section-shell,
.editorial-panel,
.entry-card,
.detail-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(250, 244, 235, 0.94));
  box-shadow: var(--shadow-md);
}

.page-intro,
.section-shell,
.entry-card,
.detail-panel,
.editorial-panel {
  padding: clamp(22px, 4vw, 30px);
}

.hero-panel {
  min-height: 100%;
  padding: clamp(28px, 5vw, 54px);
  background:
    linear-gradient(135deg, rgba(39, 75, 91, 0.11), transparent 42%),
    radial-gradient(circle at top right, rgba(154, 77, 48, 0.15), transparent 28%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(247, 239, 228, 0.96));
}

.hero-panel::after,
.section-shell::after,
.page-intro::after {
  content: "";
  position: absolute;
  inset: auto -72px -72px auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(39, 75, 91, 0.12), transparent 68%);
  pointer-events: none;
}

.hero-copy,
.page-intro > *,
.section-shell > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-title {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
}

.page-lead,
.section-copy,
.post-feed-excerpt,
.single-content,
.entry-content {
  color: var(--muted);
}

.page-lead {
  max-width: 60ch;
  font-size: 1.08rem;
}

.page-lead p:first-child {
  margin-top: 0;
}

.page-lead p:last-child {
  margin-bottom: 0;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-pill,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(39, 75, 91, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.8);
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(154, 77, 48, 0.18);
}

.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(154, 77, 48, 0.22);
}

.button-link.is-secondary,
.button-link.is-ghost {
  background: rgba(255, 251, 243, 0.85);
  color: var(--accent-2);
  border: 1px solid rgba(39, 75, 91, 0.18);
  box-shadow: none;
}

.button-link.is-secondary:hover,
.button-link.is-ghost:hover {
  background: rgba(39, 75, 91, 0.08);
  box-shadow: none;
}

.hero-side {
  display: grid;
  gap: 20px;
}

.hero-side-card {
  padding: 26px;
}

.hero-side-card-stats {
  background:
    linear-gradient(180deg, rgba(39, 75, 91, 0.08), rgba(255, 251, 243, 0.95));
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-stat {
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(39, 75, 91, 0.12);
}

.hero-stat strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-2);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
}

.hero-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-proof-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}

.hero-proof-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.hero-proof-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateY(-50%);
}

.section-block {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
}

.section-copy {
  max-width: 64ch;
  margin: 0;
}

.section-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(249, 244, 235, 0.92));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(39, 75, 91, 0.09), rgba(154, 77, 48, 0.14));
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(21, 17, 13, 0.1));
  pointer-events: none;
}

.card-media img,
.gallery-item img,
.single-media img {
  display: block;
  width: 100%;
}

.card-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.42s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-title {
  margin: 16px 0 8px;
  font-size: 1.28rem;
  line-height: 1.15;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(39, 75, 91, 0.08);
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 700;
}

.card-excerpt {
  margin: 0;
  color: var(--muted);
}

.editorial-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-feed-list {
  display: grid;
  gap: 18px;
}

.post-feed-item {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(84, 69, 50, 0.1);
}

.post-feed-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.post-feed-date {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.post-feed-title {
  margin: 0 0 10px;
  font-size: 1.22rem;
  line-height: 1.2;
}

.post-feed-title a:hover {
  color: var(--accent);
}

.post-feed-excerpt p,
.entry-content p {
  margin: 0;
}

.single {
  display: grid;
  gap: 16px;
}

.breadcrumb {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.translation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.translation-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(39, 75, 91, 0.08);
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.single-media img {
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.single-content {
  padding: 0;
}

.single-content p:first-child,
.single-content ul:first-child {
  margin-top: 0;
}

.single-content p:last-child {
  margin-bottom: 0;
}

.single-content ul {
  padding-left: 20px;
}

.single-content li + li {
  margin-top: 6px;
}

.detail-panel {
  position: sticky;
  top: 112px;
}

.detail-panel h2,
.gallery-section h2 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.85rem;
  line-height: 1;
}

.detail-list {
  margin: 0;
}

.detail-list div {
  padding: 14px 0;
  border-bottom: 1px solid rgba(84, 69, 50, 0.1);
}

.detail-list div:first-child {
  padding-top: 0;
}

.detail-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-list dt {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.gallery-section {
  margin-top: 28px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.75);
}

.gallery-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.entry-card {
  padding: 0;
}

.entry-card > * {
  padding-inline: clamp(22px, 4vw, 30px);
}

.entry-card > *:first-child {
  padding-top: clamp(22px, 4vw, 30px);
}

.entry-card > *:last-child {
  padding-bottom: clamp(22px, 4vw, 30px);
}

.pager {
  margin-top: 24px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  margin-right: 8px;
  border: 1px solid rgba(84, 69, 50, 0.16);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.84);
  color: var(--muted);
  font-weight: 700;
}

.page-numbers.current,
.page-numbers:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-footer {
  margin-top: 54px;
  border-top: 1px solid rgba(84, 69, 50, 0.12);
  background: rgba(255, 252, 247, 0.82);
}

.site-footer .container {
  padding-top: 26px;
  padding-bottom: 30px;
}

.footer-title {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
}

.footer-copy {
  max-width: 58ch;
  margin: 0 0 12px;
  color: var(--muted);
}

small {
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-panel,
  .hero-side-card,
  .section-shell,
  .editorial-panel,
  .entry-card,
  .card,
  .single-media,
  .detail-panel {
    animation: fade-up 0.62s ease both;
  }

  .hero-side-card:nth-child(2),
  .section-block:nth-of-type(2) .card,
  .section-block:nth-of-type(3) .card,
  .editorial-panel:nth-child(2) {
    animation-delay: 0.08s;
  }

  .site-header-glow {
    animation: drift 10s ease-in-out infinite alternate;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(-1.2%, 0, 0);
  }

  to {
    transform: translate3d(1.2%, 0, 0);
  }
}

@media (max-width: 1180px) {
  .hero-shell,
  .single-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

  .section-grid,
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .site-header-shell {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 36;
  }

  .site-header-tools {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 35;
    width: min(88vw, 360px);
    height: 100dvh;
    padding: 28px 20px 24px;
    background:
      linear-gradient(180deg, rgba(255, 251, 243, 0.98), rgba(244, 235, 223, 0.98));
    border-left: 1px solid rgba(84, 69, 50, 0.14);
    box-shadow: -28px 0 60px rgba(20, 16, 12, 0.18);
    transform: translateX(108%);
    transition: transform 0.28s ease;
  }

  body.nav-open .site-header-tools {
    transform: translateX(0);
  }

  body.nav-open .menu-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    background: rgba(255, 251, 243, 0.96);
  }

  .site-header-tools-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    height: 100%;
    padding-top: 72px;
  }

  .site-nav .menu,
  .fallback-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .site-nav a {
    justify-content: space-between;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(84, 69, 50, 0.1);
    background: rgba(255, 252, 246, 0.84);
  }

  .language-switcher {
    order: -1;
  }

  .hero-shell,
  .editorial-grid,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-head {
    align-items: start;
  }

  .section-grid,
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header-shell {
    min-height: 80px;
    gap: 14px;
  }

  .site-title {
    font-size: 1.9rem;
  }

  .site-tagline {
    font-size: 0.9rem;
  }

  .page-intro,
  .hero-panel,
  .hero-side-card,
  .section-shell,
  .editorial-panel,
  .entry-card,
  .detail-panel {
    border-radius: 24px;
  }

  .page-title {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
  }

  .hero-stat-grid,
  .section-grid,
  .grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .button-link,
  .section-head .button-link {
    width: 100%;
  }

  .button-link {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 18px), var(--container));
  }

  .site-header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-header-tools {
    width: min(92vw, 360px);
    padding-inline: 16px;
  }

  .page-title {
    font-size: clamp(2.05rem, 11vw, 2.9rem);
  }

  .section-heading,
  .detail-panel h2,
  .gallery-section h2 {
    font-size: 1.75rem;
  }

  .card-link {
    padding: 12px;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .hero-pill-row,
  .hero-actions,
  .language-switcher {
    gap: 8px;
  }

  .hero-pill,
  .meta-chip,
  .card-meta span,
  .translation-pill {
    width: fit-content;
    max-width: 100%;
  }
}
