/* Nyx Institute for Computational Medicine — shared stylesheet
   Scholarly, restrained treatment of the Nyx design system.
   Tokens are shared with nyxdynamics.org for brand-family consistency. */

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

:root {
  --cyan: #00D4FF;
  --cyan-bright: #5CE1FF;
  --black: #0a0a0f;
  --charcoal: #111827;
  --gray: #374151;
  --white: #f8fafc;
  --silver: #cbd5e1;
  --muted: #94a3b8;
  --maxw: 1080px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--black);
  color: var(--silver);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.font-serif { font-family: 'Playfair Display', Georgia, serif; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-bright); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Skip link for accessibility */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--cyan); color: var(--black); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Navigation */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), #14B8A6);
  display: flex; align-items: center; justify-content: center;
  color: var(--black); font-weight: 700; font-size: 16px;
}
.brand-name { color: var(--white); font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.brand-name span { display: block; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; }

.nav-links { display: flex; gap: 22px; list-style: none; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cyan); }

@media (max-width: 720px) {
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-links { gap: 16px; }
}

/* Sections */
section { padding: 72px 0; }
.bg-alt { background: var(--charcoal); border-block: 1px solid rgba(55,65,81,0.5); }

.eyebrow {
  color: var(--cyan); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 14px;
}

h1.page-title { font-size: clamp(30px, 5vw, 46px); color: var(--white); line-height: 1.15; margin-bottom: 20px; }
h2.section-title { font-size: clamp(24px, 3.4vw, 32px); color: var(--white); line-height: 1.2; margin-bottom: 12px; }
h3 { color: var(--white); font-weight: 600; }

.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--silver); max-width: 760px; }
.section-sub { color: var(--muted); max-width: 720px; margin-bottom: 32px; }

.section-header { margin-bottom: 36px; }

/* Boundary / note callout */
.note {
  border-left: 3px solid var(--cyan);
  background: rgba(0,212,255,0.05);
  padding: 16px 20px; border-radius: 0 8px 8px 0;
  color: var(--silver); font-size: 15px;
}
.note strong { color: var(--white); }

/* Card grid */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: rgba(17,24,39,0.5);
  border: 1px solid var(--gray);
  border-radius: 12px;
  padding: 28px;
}
.card:hover { border-color: rgba(0,212,255,0.35); box-shadow: 0 0 30px rgba(0,212,255,0.06); }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--silver); font-size: 15px; }
.card ul { margin: 12px 0 0 18px; color: var(--muted); font-size: 14px; }
.card ul li { margin-bottom: 4px; }

/* Publication entries */
.pub { border-bottom: 1px solid var(--gray); padding: 26px 0; }
.pub:last-child { border-bottom: none; }
.pub h3 { font-size: 18px; line-height: 1.4; margin-bottom: 8px; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px;
}
.badge-published { background: rgba(0,212,255,0.1); color: var(--cyan); border: 1px solid rgba(0,212,255,0.3); }
.badge-preprint  { background: rgba(52,211,153,0.1); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.25); }
.badge-inprep    { background: rgba(107,114,128,0.15); color: #cbd5e1; border: 1px solid rgba(107,114,128,0.3); }
.badge-venue     { background: transparent; color: var(--muted); border: 1px solid var(--gray); }
.pub-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.pub-links a::after { content: " ↗"; color: var(--muted); font-size: 12px; }
.pub-links a[href^="/"]::after, .pub-links a[href^="#"]::after { content: ""; }

/* Definition rows (frameworks) */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.step { display: flex; gap: 14px; }
.step-num {
  flex: none; width: 34px; height: 34px; border-radius: 8px;
  background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3);
  color: var(--cyan); font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step h4 { color: var(--white); font-size: 15px; margin-bottom: 3px; }
.step p { color: var(--muted); font-size: 14px; }

/* Inline meta list */
.kv { list-style: none; display: grid; gap: 8px; }
.kv li { color: var(--silver); font-size: 15px; }
.kv .k { color: var(--muted); display: inline-block; min-width: 130px; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 8px;
  font-weight: 600; font-size: 15px; transition: all 0.2s;
}
.btn-primary { background: var(--cyan); color: var(--black); }
.btn-primary:hover { background: var(--cyan-bright); color: var(--black); }
.btn-secondary { border: 1px solid var(--cyan); color: var(--cyan); }
.btn-secondary:hover { background: rgba(0,212,255,0.08); color: var(--cyan-bright); }
.btn-group { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Focus visibility */
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: 3px; }

/* Footer */
footer { background: var(--charcoal); border-top: 1px solid var(--gray); padding: 48px 0 40px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.5fr 1fr; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-boundary { color: var(--muted); font-size: 14px; max-width: 520px; }
.footer-links { list-style: none; display: grid; gap: 8px; }
.footer-links a { color: var(--silver); font-size: 14px; }
.footer-links a:hover { color: var(--cyan); }
.footer-copy { color: var(--muted); font-size: 13px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--gray); }
