/* ============================================================
   COVARY — Global Stylesheet
   Design: Light scientific UI with purple brand accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --bg:         #f6f7fb;
  --bg-card:    #ffffff;
  --bg-raised:  #eef2f8;
  --border:     #d9e0ec;
  --border-hi:  #c4cee0;

  --accent:      #6d4aff;
  --accent-dim:  #5637e6;
  --accent-glow: rgba(109,74,255,0.10);

  --text:       #18202a;
  --text-muted: #5f6b7a;
  --text-dim:   #8a95a6;

  --red:        #d64545;
  --blue:       #2563eb;
  --yellow:     #b7791f;

  --font-head: 'IBM Plex Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;

  --radius:    6px;
  --radius-lg: 12px;

  --shadow:       0 10px 28px rgba(15,23,42,0.06);
  --shadow-accent: 0 0 32px rgba(109,74,255,0.14);

  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --max-w:     1160px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: light;
}

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

::selection {
  background: rgba(109,74,255,0.16);
  color: var(--text);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #aeb8cb; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 400;
}

p {
  color: var(--text-muted);
  max-width: 72ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent-dim);
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* ---- LAYOUT ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 96px 0;
}

.section--sm {
  padding: 64px 0;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.section__heading { margin-bottom: 16px; }
.section__sub { font-size: 1.1rem; margin-bottom: 48px; max-width: 60ch; }

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

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

/* ---- ANNOUNCEMENT BAR ---- */
.announce {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.announce a {
  color: var(--accent);
}

.announce a:hover {
  text-decoration: underline;
}

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav__logo-img {
  height: 36px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--blue);
  font-weight: 800;
}

.nav__badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(109,74,255,0.22);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-decoration: none !important;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.nav__hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 860px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  .nav__links.open { display: flex; }

  .nav__links li { width: 100%; }

  .nav__links a {
    display: block;
    padding: 14px 2rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav__hamburger { display: flex; }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-hi);
}

.btn--outline:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(109,74,255,0.06);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-left: 0;
}

.btn--ghost:hover {
  color: var(--accent-dim);
  gap: 14px;
}

.btn--ghost::after { content: '→'; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
}

.card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card--accent {
  border-color: rgba(109,74,255,0.20);
  background: linear-gradient(135deg, rgba(109,74,255,0.04), var(--bg-card));
}

.card__icon {
  width: 44px;
  height: 44px;
  background: var(--accent-glow);
  border: 1px solid rgba(109,74,255,0.22);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.card__title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text);
}

.card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: gap var(--transition), color var(--transition);
}

.card__link:hover {
  gap: 12px;
  color: var(--accent-dim);
}

.card__link::after { content: '→'; }

/* ---- IMAGE PLACEHOLDER ---- */
.img-placeholder {
  background: var(--bg-raised);
  border: 2px dashed var(--border-hi);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 240px;
}

.img-placeholder svg { opacity: 0.35; }

.img-placeholder.img-placeholder--sm { min-height: 160px; }
.img-placeholder.img-placeholder--lg { min-height: 400px; }

/* ---- CODE BLOCK ---- */
.code-block {
  background: #f3f5fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  overflow-x: auto;
  color: #243041;
}

.code-block .cm { color: var(--text-dim); }
.code-block .kw { color: var(--accent); }
.code-block .str { color: #1f7a5c; }
.code-block .fn { color: #a16207; }
.code-block .var { color: #4b5563; }

/* ---- BADGE / TAG ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge--green {
  background: rgba(109,74,255,0.08);
  color: var(--accent);
  border: 1px solid rgba(109,74,255,0.18);
}

.badge--yellow {
  background: rgba(183,121,31,0.08);
  color: var(--yellow);
  border: 1px solid rgba(183,121,31,0.18);
}

.badge--red {
  background: rgba(214,69,69,0.08);
  color: var(--red);
  border: 1px solid rgba(214,69,69,0.18);
}

.badge--blue {
  background: rgba(37,99,235,0.08);
  color: var(--blue);
  border: 1px solid rgba(37,99,235,0.18);
}

/* ---- DIVIDER ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 12px 0 20px;
  max-width: 32ch;
}

.footer__powered {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer__powered-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.footer__powered-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: inline-flex;
  flex-direction: column; 
  align-items: center;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.footer__legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__legal a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer__legal a:hover {
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .footer__grid { grid-template-columns: 1fr; }
  .container { padding: 0 1.25rem; }
  .section { padding: 64px 0; }
}

/* ---- HERO ---- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  justify-content: flex-start;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(109,74,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(37,99,235,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero__grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.06;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin-right: auto;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(109,74,255,0.18);
  border-radius: 20px;
}

.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero__title {
  margin-bottom: 20px;
}

.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__desc {
  font-size: 1.15rem;
  margin-bottom: 36px;
  color: var(--text-muted);
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.hero__links a {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.hero__links a:hover {
  color: var(--text-muted);
}

.hero__links-sep {
  color: var(--border-hi);
}

/* ---- SECTION SPLITS ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split--reverse .split__visual { order: -1; }

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .split--reverse .split__visual { order: 0; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---- FEATURE LIST ---- */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '◆';
  color: var(--accent);
  font-size: 0.6rem;
  margin-top: 5px;
  flex-shrink: 0;
}

/* ---- STAT BLOCK ---- */
.stat-block {
  text-align: center;
}

.stat-block__num {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-block__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- PUBLICATION CARD ---- */
.pub-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  min-width: 250px;
}

.pub-card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.pub-card__num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-dim);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 4px;
}

.pub-card__title {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
}

.pub-card__meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 10px;
  min-width; 200px;
}

.pub-card__abs {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.pub-card__link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.pub-card__link:hover {
  color: var(--accent-dim);
}

/* ---- CONTACT FORM ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.form-field input,
.form-field textarea {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #97a2b3;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109,74,255,0.12);
  background: #fff;
}

.form-field textarea { min-height: 120px; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.22;
}

.page-hero__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.page-hero h1 { margin-bottom: 16px; max-width: 720px; }
.page-hero p { font-size: 1.1rem; max-width: 640px; }

/* ---- TIMELINE ---- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--border-hi);
  border: 2px solid var(--bg);
  border-radius: 50%;
}

.timeline-item.active::before {
  background: var(--accent);
  border-color: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-item__badge { margin-bottom: 8px; }

.timeline-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-item__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---- TABLE ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.data-table tr:hover td {
  background: rgba(109,74,255,0.03);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-1,
.fade-up-2,
.fade-up-3,
.fade-up-4 {
  opacity: 1;
}

/* ---- LOGO PLACEHOLDER ---- */
.logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-glow);
  border: 1px solid rgba(109,74,255,0.22);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.02em;
}