:root {
  color-scheme: light;
  --mint-100: #e9f7f5;
  --mint-200: #cfeee8;
  --teal-500: #3e9c98;
  --teal-600: #1d7b76;
  --teal-900: #093533;
  --sand-100: #fdfdf9;
  --gray-300: #d8e0e0;
  --gray-500: #6b7a7a;
  --gray-700: #2f3c3c;
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --shadow-soft: 0 30px 60px rgba(13, 55, 66, 0.15);
  --shadow-card: 0 18px 30px rgba(11, 82, 76, 0.12);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Public Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--gray-700);
  background: var(--sand-100);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Source Serif 4", "Times New Roman", serif;
  color: var(--teal-900);
  letter-spacing: -0.02em;
}

p {
  margin-top: 0;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px);
  background: rgba(253, 253, 249, 0.8);
  border-bottom: 1px solid var(--mint-200);
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--teal-600);
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-title {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.primary-nav {
  display: flex;
  gap: 1rem;
  font-weight: 500;
}

.primary-nav a {
  text-decoration: none;
  color: var(--gray-500);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--teal-600);
  background: var(--mint-100);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill-button {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  background: var(--teal-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.pill-button:hover,
.pill-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px rgba(15, 93, 88, 0.3);
}

.pill-button.ghost {
  background: transparent;
  color: var(--teal-600);
  box-shadow: none;
  border: 1px solid var(--mint-200);
}

.lang-toggle {
  border: 1px solid var(--mint-200);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: white;
  color: var(--teal-600);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.lang-toggle span.active {
  color: var(--teal-900);
}

.lang-toggle .divider {
  color: var(--gray-300);
}

.hero {
  background: linear-gradient(135deg, var(--sand-100), var(--mint-100));
  padding: 5rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
}

.hero-media {
  justify-self: end;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--teal-600);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--gray-500);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-media figure {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  max-width: 360px;
}

.hero-media img {
  border-radius: 24px;
}

.hero-media figcaption {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--gray-500);
}

section {
  padding: 4rem 0;
}

.section-header {
  max-width: 640px;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.section-header p {
  color: var(--gray-500);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.info-card,
.app-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(62, 156, 152, 0.08);
  box-shadow: 0 10px 20px rgba(12, 71, 69, 0.08);
}

.info-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}

.apps {
  background: var(--mint-100);
}

.apps-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
}

.app-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal-500);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.text-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--teal-600);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.text-link::after {
  content: "→";
  font-size: 0.8em;
}

.publications {
  background: white;
}

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

.publication-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: white;
  box-shadow: 0 20px 30px rgba(7, 46, 51, 0.08);
}

.pub-index {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--mint-200);
  color: var(--teal-900);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.publication-card h3 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.1rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0;
}

.pub-journal {
  margin: 0 0 0.75rem;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.pub-journal span {
  font-weight: 600;
  color: var(--teal-600);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pub-links a {
  font-weight: 600;
  color: var(--teal-600);
  text-decoration: none;
}

.contact {
  background: var(--teal-500);
  color: white;
}

.contact h2,
.contact p,
.contact .eyebrow {
  color: inherit;
}

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

.contact-actions .pill-button {
  box-shadow: none;
}

.contact-actions .pill-button.ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list .label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  background: var(--teal-600);
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer .text-link {
  color: white;
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .primary-nav {
    width: 100%;
    justify-content: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .publication-list li {
    flex-direction: column;
  }

  .hero-ctas {
    flex-direction: column;
  }
}

html[dir='rtl'] body {
  font-family: "Heebo", "Assistant", "Alef", sans-serif;
}

html[dir='rtl'] h1,
html[dir='rtl'] h2,
html[dir='rtl'] h3,
html[dir='rtl'] h4,
html[dir='rtl'] h5,
html[dir='rtl'] h6 {
  font-family: "Heebo", "Assistant", "Alef", sans-serif;
  letter-spacing: 0;
}

html[dir='rtl'] .primary-nav,
html[dir='rtl'] .hero-ctas,
html[dir='rtl'] .card-grid,
html[dir='rtl'] .contact-list,
html[dir='rtl'] .publication-list li {
  direction: rtl;
  text-align: right;
}

html[dir='rtl'] .text-link::after {
  content: "←";
}
