/* =========================================================
   Transdisciplinary AI Hub — theme
   Palette sampled from the TAIH logo
   ========================================================= */
:root {
  --crimson:    #bb1620;
  --crimson-dk: #8f0f17;
  --orange:     #ee7706;
  --orange-dk:  #c45f00;
  --tan:        #f1caa4;
  --tan-soft:   #f7e6d3;
  --cream:      #fbf6f0;
  --ink:        #1a1714;
  --ink-soft:   #4a423c;
  --muted:      #8a7f76;
  --line:       #ece2d6;
  --white:      #ffffff;

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1120px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(26,23,20,.06), 0 2px 8px rgba(26,23,20,.05);
  --shadow-md: 0 10px 30px rgba(26,23,20,.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--crimson); text-decoration: none; }
a:hover { color: var(--crimson-dk); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; letter-spacing: -.01em; margin: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; font-size: .98rem;
  padding: .8em 1.4em; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn--primary { background: var(--crimson); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--crimson-dk); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* ===================== NAVBAR ===================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 18px rgba(26,23,20,.05); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__brand { display: flex; align-items: center; }
.nav__brand img { height: 46px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a {
  color: var(--ink-soft); font-weight: 500; font-size: .95rem;
  position: relative; padding: 4px 0;
}
.nav__links a:hover { color: var(--crimson); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--crimson), var(--orange));
  transition: width .22s ease;
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  background: linear-gradient(120deg, var(--crimson), var(--orange));
  color: #fff !important; padding: .5em 1em !important; border-radius: 999px;
  font-weight: 600; font-size: .9rem;
}
.nav__cta:hover { filter: brightness(.95); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ===================== HERO ===================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 480px at 88% -10%, var(--tan-soft), transparent 60%),
    linear-gradient(180deg, var(--cream), var(--white));
}
.hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 96px 24px 88px;
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center;
}
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 600;
  color: var(--crimson); margin: 0 0 14px;
}
.hero__title { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 700; color: var(--ink); }
.hero__title-accent {
  background: linear-gradient(110deg, var(--crimson) 10%, var(--orange) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; margin: 22px 0 30px; text-align: justify; hyphens: auto; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__mark { display: flex; justify-content: center; }
.hero__mark img {
  width: min(300px, 78%); filter: drop-shadow(0 18px 36px rgba(187,22,32,.18));
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-1.5deg); } }

/* decorative shards */
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.shard { position: absolute; opacity: .9; }
.shard--tan     { top: -60px; right: 22%; width: 0; height: 0; border-left: 90px solid transparent; border-right: 90px solid transparent; border-bottom: 150px solid var(--tan); opacity: .5; transform: rotate(18deg); }
.shard--crimson { bottom: -40px; left: -30px; width: 180px; height: 180px; background: var(--crimson); opacity: .06; transform: rotate(20deg); border-radius: 24px; }
.shard--orange  { top: 30%; left: 40%; width: 0; height: 0; border-left: 40px solid transparent; border-right: 40px solid transparent; border-bottom: 70px solid var(--orange); opacity: .12; }
.shard--black   { bottom: 18%; right: 8%; width: 120px; height: 120px; background: var(--ink); opacity: .04; transform: rotate(12deg); }

/* ===================== SECTIONS ===================== */
.section { padding: 86px 0; }
.section--alt { background: var(--cream); }
.section__head { max-width: 820px; margin: 0 0 44px; }
.section__title { font-size: clamp(2.1rem, 4.4vw, 3.1rem); font-weight: 700; letter-spacing: -.02em; margin: 0; color: var(--ink); }
.section__sub { color: var(--muted); font-size: 1.1rem; margin: 14px 0 0; }

/* ---------- About ---------- */
.about__lead { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 48px; align-items: start; }
.about__lead p { font-size: 1.08rem; color: var(--ink-soft); margin: 0; text-align: justify; hyphens: auto; }
.about__lead strong { color: var(--ink); }

/* ---------- News ---------- */
.news-list { display: grid; gap: 18px; max-width: 880px; }
.news-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 4px solid var(--crimson); padding: 24px 28px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
  color: inherit; text-decoration: none;
}
.news-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-item__date { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--crimson); padding-top: 2px; }
.news-item__title { font-size: 1.2rem; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.news-item__desc { margin: 0 0 12px; color: var(--ink-soft); font-size: .98rem; text-align: justify; hyphens: auto; }
.news-item__cta { font-weight: 600; color: var(--crimson); display: inline-flex; align-items: center; gap: .3em; }
.news-item:hover .news-item__cta { color: var(--crimson-dk); }
.news-more { margin: 28px 0 0; }

/* news article page */
.news-article { max-width: 70ch; }
.news-article p { font-size: 1.12rem; color: var(--ink-soft); margin: 0 0 18px; text-align: justify; hyphens: auto; }
.news-article__meta { color: var(--muted); font-size: .95rem; margin: 14px 0 0; }
.news-article__cta { margin: 26px 0 0; }
.news-back { margin: 36px 0 0; font-weight: 600; }

/* ---------- Join page ---------- */
.page-hero {
  position: relative; overflow: hidden; padding: 80px 0 48px;
  background:
    radial-gradient(900px 360px at 90% -20%, var(--tan-soft), transparent 60%),
    linear-gradient(180deg, var(--cream), var(--white));
}
.page-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.page-hero__title { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; color: var(--ink); margin-top: 12px; }
.page-hero__lead { color: var(--ink-soft); font-size: 1.12rem; max-width: 60ch; margin: 16px 0 0; text-align: justify; hyphens: auto; }

.join-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 920px; }
.join-card { display: flex; flex-direction: column; align-items: flex-start; }
.join-card__tag {
  text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700;
  color: var(--crimson); background: rgba(187,22,32,.09);
  padding: .3em .8em; border-radius: 999px; margin-bottom: 16px;
}
.join-card__tag--orange { color: var(--orange-dk); background: rgba(238,119,6,.1); }
.join-card__title { font-size: 1.5rem; font-weight: 700; margin: 0 0 12px; color: var(--ink); }
.join-card__desc { color: var(--ink-soft); margin: 0 0 24px; text-align: justify; hyphens: auto; }
.join-card .btn { margin-top: auto; }
.join-note { margin-top: 28px; color: var(--ink-soft); }
.join-note a { font-weight: 600; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--research { grid-template-columns: repeat(3, 1fr); }
.grid--events   { grid-template-columns: repeat(4, 1fr); }
.grid--team     { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__title { font-size: 1.18rem; font-weight: 600; margin: 0 0 10px; color: var(--ink); }
.card__body { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* research cards: accent stripe by color */
.card--research { position: relative; overflow: hidden; }
.card--research::before { content: ""; position: absolute; top: 0; left: 0; height: 4px; width: 100%; }
.card--crimson::before { background: var(--crimson); }
.card--orange::before  { background: var(--orange); }
.card--black::before   { background: var(--ink); }
.card__glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
  font-size: 1.4rem; background: var(--tan-soft); color: var(--crimson);
}
.card--orange .card__glyph { color: var(--orange-dk); }
.card--black  .card__glyph { color: var(--ink); }

/* event cards */
.card--event .card__meta {
  display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--orange-dk);
  background: rgba(238,119,6,.1); padding: .3em .7em; border-radius: 999px; margin-bottom: 14px;
}

/* person cards */
.card--person { text-align: center; }
.person__avatar {
  width: 132px; height: 132px; aspect-ratio: 1 / 1; margin: 0 auto 18px;
  border-radius: 50%; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; color: #fff;
  background: linear-gradient(135deg, var(--crimson), var(--orange));
  box-shadow: 0 8px 20px rgba(187,22,32,.25);
}
.person__photo { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; border-radius: 50%; display: block; }
.person__name { font-size: 1.1rem; font-weight: 600; margin: 0 0 4px; }
.person__name a { color: var(--ink); }
.person__name a:hover { color: var(--crimson); }
.person__role { font-size: .9rem; font-weight: 600; color: var(--crimson); margin: 0 0 8px; }
.person__focus { font-size: .92rem; color: var(--ink-soft); margin: 0 0 4px; }
.person__aff { font-size: .85rem; color: var(--muted); margin: 0; }
.person__links { margin: 10px 0 0; font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .4em .7em; }
.person__links a { font-weight: 600; color: var(--crimson); }
.person__links a:hover { color: var(--crimson-dk); }
.team__more { margin: 32px 0 0; font-weight: 600; }
.team__more a { display: inline-flex; align-items: center; gap: .3em; }

/* ---------- Sponsors ---------- */
.sponsors { display: flex; flex-wrap: wrap; gap: 20px; }
.sponsor {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 28px; box-shadow: var(--shadow-sm); flex: 1 1 260px;
  border-left: 4px solid var(--orange);
}
.sponsor__name { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.sponsor__aff { display: block; color: var(--muted); font-size: .92rem; margin-top: 4px; }
.sponsors__cta { margin-top: 26px; color: var(--ink-soft); font-size: 1.02rem; }
.sponsors__cta a { font-weight: 600; }

/* ===================== PUBLICATIONS ===================== */
.pub-intro { max-width: 70ch; color: var(--ink-soft); font-size: 1.08rem; margin: 0 0 6px; text-align: justify; hyphens: auto; }
.pub-groups { display: grid; gap: 44px; }
.pub-group { border-top: 2px solid var(--line); padding-top: 26px; }
.pub-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 18px; }
.pub-group__name { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 0; }
.pub-group__role { color: var(--crimson); font-weight: 600; font-size: .92rem; }
.pub-group__links { margin-left: auto; display: flex; flex-wrap: wrap; gap: .4em .9em; font-size: .85rem; }
.pub-group__links a { font-weight: 600; }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pub {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 4px solid var(--orange); padding: 16px 20px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.pub:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pub__year { font-family: var(--font-head); font-weight: 700; color: var(--orange-dk); font-size: .95rem; padding-top: 2px; }
.pub__title { font-weight: 600; color: var(--ink); margin: 0 0 4px; font-size: 1rem; line-height: 1.4; }
.pub__title a { color: var(--ink); }
.pub__title a:hover { color: var(--crimson); }
.pub__authors { margin: 0 0 4px; color: var(--ink-soft); font-size: .9rem; }
.pub__meta { margin: 0; color: var(--muted); font-size: .9rem; }
.pub__venue { font-weight: 600; color: var(--crimson); }

/* ===================== FOOTER ===================== */
.footer { background: var(--ink); color: #d9cfc5; }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 64px 24px 40px;
  display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 40px;
}
.footer__brand img { height: 52px; width: auto; margin-bottom: 18px; border-radius: 8px; }
.footer__brand p { color: #b6a99d; font-size: .96rem; max-width: 34em; margin: 0; }
.footer__col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tan); margin: 0 0 14px; }
.footer__col p { margin: 0 0 12px; color: #c8bdb2; font-size: .95rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 10px; }
.footer__col a { color: #d9cfc5; }
.footer__col a:hover { color: var(--orange); }
.footer__bar {
  border-top: 1px solid rgba(255,255,255,.1);
  max-width: var(--maxw); margin: 0 auto; padding: 20px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; color: #9a8e82;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 960px) {
  .grid--research, .grid--events, .grid--team { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__mark { order: -1; }
  .hero__mark img { width: 180px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav__toggle { display: block; }
  .nav__brand img { height: 38px; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub-group__links { margin-left: 0; }
  .join-grid { grid-template-columns: 1fr; }
  .about__lead { grid-template-columns: 1fr; gap: 18px; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__cta { text-align: center; margin-top: 12px; }
  .section { padding: 60px 0; }
}

@media (max-width: 540px) {
  .grid--research, .grid--events, .grid--team { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__inner { padding-top: 64px; }
}

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