/* ============================================================
   FutureMLS Lab — stylesheet
   Academic / editorial style: serif display headings, clean
   sans body, restrained navy palette, generous whitespace.
   ============================================================ */

:root {
  --ink: #14181f;          /* headings, near-black */
  --body: #39414e;         /* body text */
  --muted: #6a7280;        /* secondary text */
  --faint: #97a0ad;        /* tertiary / labels */
  --line: #e3e7ee;         /* hairlines */
  --line-strong: #cfd6e0;

  --bg: #ffffff;
  --bg-alt: #f6f7f9;       /* alternating sections */
  --bg-deep: #0f1d33;      /* footer */

  --navy: #13294b;         /* primary brand */
  --navy-700: #1c3a63;
  --link: #1c4f93;         /* link blue */
  --link-hover: #123a6b;

  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 2px rgba(15, 29, 51, .05);
  --shadow-md: 0 12px 30px rgba(15, 29, 51, .09);

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1080px;
  --maxw-text: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 28px;
}

/* ===================== Navigation ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.nav__logo { width: 30px; height: 30px; border-radius: 7px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav__links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color .18s ease;
  position: relative;
  white-space: nowrap;
}
.nav__links a:hover { color: var(--navy); }
.nav__links a:not(.nav__ext)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1.5px;
  background: var(--navy);
  transition: width .22s ease;
}
.nav__links a:not(.nav__ext):hover::after { width: 100%; }
.nav__ext {
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink) !important;
  transition: border-color .18s ease, background .18s ease;
}
.nav__ext:hover { border-color: var(--navy); background: var(--bg-alt); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 23px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== Hero ===================== */
.hero {
  background:
    linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(64px, 11vw, 128px);
}
.hero__inner { max-width: 860px; }
.hero__heading {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.hero__logo {
  width: clamp(56px, 6.5vw, 72px);
  height: clamp(56px, 6.5vw, 72px);
  border-radius: 14px;
  flex-shrink: 0;
}
.hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 20px;
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(33px, 5.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
  min-width: 0;
  color: var(--ink);
}
.hero__lead {
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.65;
  color: var(--body);
  margin: 0 0 34px;
  max-width: 60ch;
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.hero__topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.hero__topics li {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 999px;
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn--primary {
  background: var(--navy);
  color: #fff;
}
.btn--primary:hover { background: var(--navy-700); }
.btn--ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }

/* ===================== Sections ===================== */
.section { padding-block: clamp(58px, 8vw, 96px); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section__head { max-width: var(--maxw-text); margin-bottom: 44px; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink);
}
.section__sub {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}

/* ===================== Prose blocks ===================== */
.prose { max-width: var(--maxw-text); }
.prose p { margin: 0 0 20px; }
.prose__lead {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.6;
  color: var(--ink);
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--link); font-weight: 500; border-bottom: 1px solid rgba(28, 79, 147, .3); }
.prose a:hover { border-bottom-color: var(--link); }
.prose__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--muted);
}

/* ===================== Founder ===================== */
.founder {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}
.founder__media { text-align: left; }
.founder__avatar,
.founder__photo {
  width: 160px; height: 160px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.founder__avatar {
  display: grid;
  place-items: center;
  background: var(--navy);
  border: 1px solid var(--navy-700);
}
.founder__avatar::after {
  content: attr(data-mono);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 52px;
  color: #fff;
  letter-spacing: .02em;
}
.founder__photo { object-fit: cover; box-shadow: var(--shadow-sm); }
.founder__photo { object-position: center; }
.founder__name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 3px;
}
.founder__alias {
  font-size: 13px;
  color: var(--faint);
  margin: 0 0 8px;
}
.founder__role {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}
.founder__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.founder__links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--link);
  width: fit-content;
}
.founder__links a:hover { text-decoration: underline; }

/* ===================== Research topics ===================== */
.topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.topic {
  background: #fff;
  padding: 32px 30px;
  transition: background .2s ease;
}
.topic:hover { background: var(--bg-alt); }
.topic__no {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: .05em;
}
.topic__title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin: 10px 0 10px;
  line-height: 1.25;
}
.topic p { margin: 0; font-size: 15.5px; color: var(--body); }

/* ===================== News ===================== */
.news { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.news__item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.news__item:first-child { border-top: 1px solid var(--line); }
.news__date {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
}
.news__text { margin: 0; font-size: 16.5px; color: var(--body); }
.news__text strong { color: var(--ink); font-weight: 600; }
.news__text a { color: var(--link); border-bottom: 1px solid rgba(28, 79, 147, .3); }
.news__text a:hover { border-bottom-color: var(--link); }

/* ===================== People ===================== */
.team__group {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 8px 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.team__group::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
  margin-bottom: 48px;
}
.people--advisors { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
.people:last-child { margin-bottom: 0; }
.person {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.person__avatar {
  flex: 0 0 64px;
  width: 64px; height: 64px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--navy-700), var(--navy));
  border: 1px solid var(--navy);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.person__avatar::after {
  content: attr(data-mono);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  color: #fff;
  letter-spacing: .01em;
}
.person__photo {
  flex: 0 0 64px;
  width: 64px; height: 64px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
}
.person__info { min-width: 0; }
.person__bio { font-size: 14px; color: var(--body); margin: 0 0 10px; line-height: 1.55; }
.person__name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--ink);
}
.person__role {
  font-size: 13px;
  color: var(--faint);
  margin: 0 0 8px;
  letter-spacing: .02em;
}
.person__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
}
.person__tags li {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--navy);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.45;
}
.person__links { display: flex; gap: 14px; flex-wrap: wrap; }
.person__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--link);
}
.person__links a:hover { text-decoration: underline; }

/* ===================== Projects ===================== */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.project:hover { border-color: var(--navy); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.project__preview {
  aspect-ratio: 16 / 10;
  background: #0d1320;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.project__preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project:hover .project__preview img { transform: scale(1.03); }
.project__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.project__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.project__name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.project__tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.project__venue { font-size: 13px; color: var(--faint); margin: 0 0 12px; }
.project__desc { font-size: 14.5px; color: var(--body); margin: 0 0 18px; flex: 1; line-height: 1.6; }
.project__link {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--link);
}

/* ===================== Project detail page ===================== */
.proj { padding-block: clamp(32px, 5vw, 56px); max-width: 880px; }
.proj__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 26px;
}
.proj__back:hover { color: var(--navy); }
.proj__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 16px;
}
.proj__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 30px;
  font-size: 14.5px;
  color: var(--muted);
}
.proj__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 3px 11px;
  border-radius: 999px;
}
.proj__figure {
  margin: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.proj__figure img { width: 100%; display: block; }
.proj__lead {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 34px;
}
.proj__authors {
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  margin: 0 0 34px;
}
.proj__authors strong { color: var(--ink); font-weight: 600; }
.proj__list {
  margin: 0 0 34px;
  padding-left: 20px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
}
.proj__list li { margin-bottom: 8px; }
.proj__list strong { color: var(--ink); font-weight: 600; }
.proj__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===================== Contact ===================== */
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.prose .contact__actions a.btn,
.contact__actions .btn {
  border-bottom: 0;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.1;
  justify-content: center;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.contact__actions .btn--primary {
  background: linear-gradient(135deg, #2f7df6 0%, #185ed8 100%);
  color: #fff;
  border-color: #185ed8;
  box-shadow: 0 10px 24px rgba(24, 94, 216, .24);
}
.contact__actions .btn--primary:hover {
  background: linear-gradient(135deg, #4790ff 0%, #236fe8 100%);
  color: #fff;
  border-color: #236fe8;
  box-shadow: 0 14px 30px rgba(24, 94, 216, .32);
  transform: translateY(-1px);
}
.contact__actions .btn--ghost {
  background: #fff;
  color: #185ed8;
  border-color: #b9cff7;
  box-shadow: 0 8px 20px rgba(15, 29, 51, .08);
}
.contact__actions .btn--ghost:hover {
  background: #eef5ff;
  color: #0f4fc4;
  border-color: #2f7df6;
  box-shadow: 0 12px 26px rgba(24, 94, 216, .16);
  transform: translateY(-1px);
}

/* ===================== Footer ===================== */
.footer {
  background: var(--bg-deep);
  color: rgba(255, 255, 255, .68);
  padding-block: 44px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__logo { width: 40px; height: 40px; border-radius: 9px; }
.footer__brand strong { color: #fff; font-family: var(--font-serif); font-size: 16px; font-weight: 600; }
.footer__brand p { margin: 2px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .55); }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { font-size: 14.5px; color: rgba(255, 255, 255, .68); transition: color .18s ease; }
.footer__links a:hover { color: #fff; }
.footer__copy {
  width: 100%;
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .42);
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 22px;
}

/* ===================== Reveal animation ===================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */
@media (max-width: 880px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: 66px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 14px 28px 22px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { width: 100%; padding: 10px 0; font-size: 16px; }
  .nav__ext { margin-top: 8px; }

  .founder { grid-template-columns: 1fr; gap: 28px; }
  .founder__media { display: flex; flex-direction: column; }
  .topics { grid-template-columns: 1fr; }
  .people, .people--advisors { grid-template-columns: 1fr; max-width: none; }
  .projects { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .news__item { grid-template-columns: 1fr; gap: 4px; }
  .hero { padding-block: clamp(52px, 14vw, 96px); }
  .hero__heading { display: block; }
  .hero__heading .hero__logo { margin-bottom: 16px; }
  .btn { padding: 11px 18px; }
  .contact__actions {
    align-items: stretch;
    flex-direction: column;
  }
  .contact__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
