/* OASIS @ MBZUAI — sand, ink, water. Light + dark, no external assets. */

:root {
  --bg:        #fbf8f2;
  --bg-alt:    #f4efe4;
  --surface:   #ffffff;
  --ink:       #1b1a17;
  --ink-soft:  #413d35;
  --muted:     #6c6557;
  --rule:      #e3dccd;
  --water:     #0e6a67;
  --water-dim: #0e6a6714;
  --sun:       #a85d24;
  --maxw:      68rem;
  --radius:    10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #111110;
    --bg-alt:    #191917;
    --surface:   #1b1b18;
    --ink:       #ece6da;
    --ink-soft:  #cfc8b9;
    --muted:     #968e7d;
    --rule:      #2d2b25;
    --water:     #5fcfc6;
    --water-dim: #5fcfc61a;
    --sun:       #d9914e;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1em; }

a { color: var(--water); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip {
  position: absolute; left: -9999px;
  background: var(--water); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: saturate(140%) blur(8px);
}

.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none;
}
.brand-mark { color: var(--water); display: flex; }
.brand-text { display: flex; align-items: baseline; gap: .45rem; }
.brand-text strong {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.22rem; letter-spacing: .06em; font-weight: 600;
}
.brand-at { color: var(--muted); font-size: .8rem; letter-spacing: .04em; }

.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .94rem;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--water); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--water); }

/* ---------- hero ---------- */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero .expansion {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.1rem;
}
.hero h1 { max-width: 20ch; }
.hero .lede {
  font-size: clamp(1.05rem, .98rem + .4vw, 1.25rem);
  color: var(--ink-soft); max-width: 58ch; margin-top: 1.2rem;
}
.motto {
  display: inline-block; margin-top: 1.6rem; font-style: italic;
  color: var(--water); border-left: 2px solid var(--water);
  padding-left: .8rem; font-size: 1.05rem;
}

/* ---------- sections ---------- */

.section { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule); }
.section-alt { background: var(--bg-alt); }
.section > .wrap > h2 { margin-bottom: 1.4rem; }

.lead-row { display: grid; gap: 2rem; grid-template-columns: minmax(0,1fr); }
@media (min-width: 52rem) { .lead-row { grid-template-columns: 14rem minmax(0,1fr); } }
.lead-row .side { color: var(--muted); font-size: .86rem; letter-spacing: .1em; text-transform: uppercase; }

.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .kicker {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sun); display: block; margin-bottom: .5rem;
}

/* ---------- publications ---------- */

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 2rem; }
.filters button {
  font: inherit; font-size: .88rem;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .35rem .95rem; cursor: pointer;
}
.filters button:hover { border-color: var(--water); color: var(--water); }
.filters button[aria-pressed="true"] {
  background: var(--water); border-color: var(--water); color: var(--bg);
}

.year-head {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.5rem; color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .3rem; margin: 2.4rem 0 1.1rem;
}
.year-head:first-of-type { margin-top: 0; }

ol.pubs { list-style: none; margin: 0; padding: 0; }
ol.pubs li { padding: .85rem 0; border-bottom: 1px dotted var(--rule); }
ol.pubs li:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; color: var(--ink); }
.pub-authors { color: var(--ink-soft); font-size: .93rem; }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-meta { font-size: .86rem; color: var(--muted); margin-top: .15rem; }
.badge {
  display: inline-block; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .1rem .5rem; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--muted); margin-left: .4rem;
  vertical-align: 1px;
}
.badge.journal  { border-color: var(--water); color: var(--water); }
.badge.preprint { border-color: var(--sun);   color: var(--sun); }

/* ---------- people ---------- */

.person {
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: 4.5rem minmax(0,1fr);
  padding: 1.1rem 0; border-bottom: 1px dotted var(--rule);
}
.avatar {
  width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: var(--water-dim); color: var(--water);
  display: grid; place-items: center;
  font-family: "Iowan Old Style", Georgia, serif; font-size: 1.3rem;
  border: 1px solid var(--rule); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { margin-bottom: .1rem; }
.person .role { color: var(--sun); font-size: .85rem; margin-bottom: .35rem; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule); background: var(--bg-alt);
  margin-top: 3rem; padding: 2rem 0; font-size: .9rem;
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.foot-name { font-family: "Iowan Old Style", Georgia, serif; margin-bottom: .2rem; }
.foot-links { display: flex; flex-direction: column; gap: .3rem; }
.site-foot p { margin: 0; }

/* ---------- misc ---------- */

.note {
  border-left: 3px solid var(--sun); background: var(--bg-alt);
  padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem;
}

/* ---------- news ---------- */

ul.news { list-style: none; margin: 0; padding: 0; }
ul.news li {
  padding: .6rem 0; border-bottom: 1px dotted var(--rule);
  display: grid; gap: .1rem .9rem; grid-template-columns: minmax(0,1fr);
}
@media (min-width: 40rem) { ul.news li { grid-template-columns: 6rem minmax(0,1fr); } }
ul.news li:last-child { border-bottom: 0; }
.news-date {
  color: var(--muted); font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
}
.badge.award { border-color: var(--sun); color: var(--sun); }
