/* css/styles.css */

:root {
  --primary-blue: #0066CC;
  --secondary-turquoise: #00A3A3;
  --dark-gray: #2C3E50;
  --medium-gray: #546E7A;
  --light-gray: #ECEFF1;
  --white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
  --nav-offset: 120px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--dark-gray);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

body > header {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-turquoise));
  color: var(--white);
  padding: 4rem 0 3rem;
  box-shadow: 0 2px 8px var(--shadow);
}

body > header h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

body > header .subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.95;
}

body > nav {
  background: var(--white);
  border-bottom: 1px solid var(--light-gray);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px var(--shadow);
}

body > nav::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.7) 40%,
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 99;
}

body > nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

body > nav li {
  flex: 1;
  min-width: 200px;
}

body > nav button {
  width: 100%;
  padding: 1.2rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--medium-gray);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  text-align: center;
}

body > nav button:hover {
  background: var(--light-gray);
  color: var(--primary-blue);
}

body > nav button.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  background: rgba(0, 102, 204, 0.05);
}

body > main {
  padding: 3rem 0;
}

.domain-section {
  margin-bottom: 4rem;
  scroll-margin-top: var(--nav-offset);
}

.domain-section:last-of-type {
  margin-bottom: 2rem;
}

.domain-title {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
  font-weight: 400;
  border-bottom: 2px solid var(--secondary-turquoise);
  padding-bottom: 0.8rem;
}

.domain-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--dark-gray);
  margin-bottom: 3rem;
  text-align: justify;
}

.domain-text.is-collapsible {
  margin-bottom: 0.9rem;
  position: relative;
  transition: max-height 0.25s ease;
}

.domain-text.is-collapsed {
  max-height: var(--collapsible-max-height, 12em);
  overflow: hidden;
}

.domain-text.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.95) 70%
  );
  pointer-events: none;
}

.publications-section h3 {
  font-size: 1.3rem;
  color: var(--medium-gray);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.publication {
  background: var(--white);
  border-left: 4px solid var(--secondary-turquoise);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px var(--shadow);
  transition: all 0.2s;
}

.publication:hover {
  box-shadow: 0 4px 12px var(--shadow-hover);
  transform: translateX(4px);
}

.publication-title {
  font-size: 1.1rem;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

.publication-description {
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--medium-gray) 75%, black);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.text-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0;
  margin: 0.25rem 0 1.2rem;
  background: transparent;
  border: none;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.text-toggle-icon {
  color: var(--secondary-turquoise);
}

.text-toggle:hover,
.text-toggle:focus-visible {
  color: var(--secondary-turquoise);
  outline: none;
}

.publication-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.publication-note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--medium-gray);
  font-style: italic;
}

.source-label {
  font-size: 0.89rem;
  color: var(--medium-gray);
  font-style: italic;
  display: block;
  width: 100%;
  margin-bottom: 0.3rem;
}

.publication-source {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 220px;
}

.publication-doi {
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.publication-doi:hover {
  color: var(--secondary-turquoise);
  text-decoration: underline;
}

.publication-doi.unavailable {
  color: var(--medium-gray);
  cursor: default;
  text-decoration: none;
}

.publication-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.publication-link:hover {
  color: var(--secondary-turquoise);
  text-decoration: underline;
}

.publication-link-icon {
  color: var(--secondary-turquoise);
  font-size: 0.95rem;
}

.publication-link.is-disabled {
  color: var(--medium-gray);
  cursor: default;
  text-decoration: none;
}

.intro-section {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.03), rgba(0, 163, 163, 0.03));
  border-radius: 8px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid var(--light-gray);
}

.intro-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--dark-gray);
  text-align: justify;
  margin-bottom: 1rem;
}

.intro-section p:last-child {
  margin-bottom: 0;
}

body > footer {
  background: var(--dark-gray);
  color: var(--white);
  padding: 2rem 0;
  margin-top: 0;
  text-align: center;
}

body > footer .legal-links {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
  padding: 0.25rem 0;
}

body > footer .legal-links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

body > footer .legal-links a:hover,
body > footer .legal-links a:focus {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.contact-section {
  background: var(--light-gray);
  padding: 3.5rem 0;
  margin-top: 2rem;
}

.contact-section h2 {
  font-size: 1.6rem;
  color: var(--primary-blue);
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 1px 4px var(--shadow);
}

.contact-card h3 {
  color: var(--primary-blue);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.contact-card p {
  color: var(--dark-gray);
  line-height: 1.6;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-card p strong {
  color: var(--dark-gray);
  font-weight: 500;
}

.location-note {
  font-size: 0.85rem;
  color: var(--medium-gray);
  font-style: italic;
}

.network-links {
  list-style: none;
  padding: 0;
}

.network-links li {
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
}

.network-links li:last-child {
  margin-bottom: 0;
}

.network-links a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.network-links a:hover {
  color: var(--secondary-turquoise);
  text-decoration: underline;
}

body > footer p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Legal suite overrides */
.ls-legal-suite__overlay {
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: none;
}

body.ls-modal-open > *:not(.ls-legal-suite):not(.ls-consent-banner) {
  filter: none;
}

@media (max-width: 767.98px) {
  .domain-text,
  .intro-section p {
    text-align: left;
  }
}

.ls-legal-suite__modal {
  background: #ffffff;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  body > header h1 {
    font-size: 2rem;
  }

  body > header .subtitle {
    font-size: 1rem;
  }

  body > nav ul {
    flex-direction: column;
  }

  body > nav li {
    width: 100%;
  }
  
  .domain-title {
    font-size: 1.6rem;
  }
  
  .domain-text {
    font-size: 1rem;
  }
  
  .intro-section {
    padding: 1.5rem;
  }
  
  .publication-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--medium-gray);
  width: 2.75rem;
  height: 2.5rem;
  padding: 0;
  position: relative;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.nav-toggle::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: currentColor;
  box-shadow: 0 -8px 0 currentColor, 0 8px 0 currentColor;
  border-radius: 0;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 4px;
}

.nav-toggle[aria-expanded="true"] {
  color: var(--primary-blue);
}

@media (max-width: 991.98px) {
  body {
    overflow-x: hidden;
  }

  .container {
    padding: 0 1.5rem;
    max-width: 100%;
  }

  body > nav .container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
  }

  body > nav li {
    flex: none;
    width: 100%;
  }

  body > nav button {
    min-height: 44px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  #primary-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  #primary-nav.is-open {
    display: flex;
  }

  .publication-description,
  .publication-link,
  .network-links a {
    overflow-wrap: anywhere;
  }

  .publication-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

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