/* ===========================================================
   ensherf.info — "Aubergine stage with white spotlights" (design4)
   Soft-white canvas + aubergine CTAs + deep-plum dark bands.
   Outfit (display) + Inter (body). Images kept at natural ratio.
   =========================================================== */

:root {
  --aubergine: #611f69;
  --plum:      #481a54;
  --plumshadow:#3d0157;
  --wash:      #f9f0ff;
  --lav:       #eac8fe;
  --iris-light:#d17dfe;
  --carbon:    #1d1c1d;
  --charcoal:  #454245;
  --midgray:   #696969;
  --fog:       #edeaed;
  --canvas:    #fefbff;
  --white:     #ffffff;

  --font-display: "Outfit", "Salesforce-Avant-Garde", system-ui, sans-serif;
  --font-body:    "Inter", "Salesforce-Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1160px;
  --gap: clamp(64px, 8vw, 96px);
  --shadow-card: rgba(0,0,0,0.10) 0px 0px 32px 0px;
  --shadow-nav: rgba(0,0,0,0.08) 0px 1px 3px 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--carbon);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

/* IMAGES: always natural aspect ratio — never stretched or cropped */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--aubergine); text-decoration: none; }
a:hover { color: var(--plumshadow); }
:focus-visible { outline: 2px solid var(--aubergine); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.6rem; }
.section { padding: var(--gap) 0; }
.band-wash { background: var(--wash); }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0 0 0.5em; }
.display {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.05; color: var(--carbon);
}
.sec-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.018em;
  font-size: clamp(1.85rem, 4vw, 2.5rem); line-height: 1.1; margin: 0 0 0.8rem;
}
.eyebrow {
  font-family: var(--font-body); text-transform: uppercase; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--midgray); margin: 0 0 1rem; display: block;
}
.lede { font-size: 1.18rem; line-height: 1.55; max-width: 42rem; color: var(--charcoal); }
.muted { color: var(--charcoal); }

/* ---------- Buttons (rectangular, 4px) ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-body);
  font-weight: 600; font-size: 1rem; border-radius: 4px; padding: 0.85rem 1.6rem; border: 1px solid transparent; cursor: pointer; }
.btn-fill { background: var(--aubergine); color: #fff; }
.btn-fill:hover { background: var(--plumshadow); color: #fff; }
.btn-ghost { background: transparent; color: var(--plumshadow); }
.btn-ghost:hover { background: var(--wash); color: var(--plumshadow); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.on-dark.btn-fill { background: #fff; color: var(--plum); }
.on-dark.btn-fill:hover { background: var(--lav); }
.on-dark.btn-ghost { color: #fff; }
.on-dark.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: var(--shadow-nav); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 4.4rem; gap: 1rem; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--carbon); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--font-body); font-weight: 600; font-size: 0.92rem; color: var(--carbon); }
.nav-links a:hover { color: var(--aubergine); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(56px, 8vw, 92px) 0 0; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); max-width: 17ch; margin: 0 auto 1.4rem; }
.hero .subhead { font-size: 1.2rem; max-width: 40rem; margin: 0 auto 2rem; color: var(--charcoal); }
.hero .cta-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* floating photo card (product-screenshot treatment), natural ratio */
.photo-card { background: var(--white); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
.photo-card img { width: 100%; height: auto; }   /* undistorted */
.hero-shot { max-width: 860px; margin: 3.2rem auto 0; }

/* ---------- Credit strip ---------- */
.creditbar { margin-top: var(--gap); }
.creditbar .wrap { display: flex; gap: 0.7rem 1.6rem; flex-wrap: wrap; justify-content: center; align-items: center;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: var(--midgray); }
.creditbar .lbl { text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; }

/* ---------- Cards ---------- */
.cards3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; margin-top: 2.6rem; }
.card { border: 1px solid var(--lav); border-radius: 16px; padding: 1.6rem; background: transparent; }
.card .k { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--midgray); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 0.6rem 0 0.4rem; }
.card p { margin: 0; color: var(--charcoal); font-size: 0.98rem; }

.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.6rem; }
.streamcard { border: 1px solid var(--lav); border-radius: 16px; padding: 2rem; background: transparent; }
.streamcard h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin: 0.3rem 0 0.5rem; }
.streamcard p { margin: 0 0 1.2rem; color: var(--charcoal); }

/* ---------- Papers ---------- */
.papers { margin-top: 2.6rem; display: grid; gap: 1rem; }
.paper { border: 1px solid var(--lav); border-radius: 16px; padding: 1.6rem 1.8rem; background: var(--white); }
.paper .cite { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; color: var(--midgray); margin: 0 0 0.55rem; }
.paper h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; line-height: 1.12; margin: 0 0 0.5rem; }
.paper p { margin: 0; color: var(--charcoal); max-width: 48rem; }
.award { display: inline-block; margin-top: 0.8rem; font-family: var(--font-body); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--aubergine); background: var(--wash); border: 1px solid var(--lav); padding: 0.22rem 0.7rem; border-radius: 90px; }
.publist .award { margin-left: 0.4rem; }

/* ---------- News ---------- */
.newslist { display: grid; gap: 0.9rem; }
.newsitem { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid var(--lav); border-radius: 16px; padding: 1.2rem 1.5rem; background: var(--white); }
.newsitem .n-main { display: flex; flex-direction: column; gap: 0.3rem; }
.newsitem .outlet { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--midgray); }
.newsitem .headline { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--carbon); }
.newsitem a.headline:hover { color: var(--aubergine); }

/* stream section: recent-work label + see-all */
.stream-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.4rem; }
.stream-head .lbl { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--midgray); }
.stream-head a { font-weight: 600; font-size: 0.9rem; }

/* ---------- Contact links (inside About) ---------- */
.about-contact { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--fog); }
.about-contact .lbl { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--midgray); display: block; margin-bottom: 0.8rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.contact-links a { font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: var(--aubergine);
  border: 1px solid var(--lav); border-radius: 999px; padding: 0.48rem 1.1rem; background: var(--white); }
.contact-links a:hover { background: var(--aubergine); color: #fff; }
.contact-links a.primary { background: var(--aubergine); color: #fff; border-color: var(--aubergine); }
.contact-links a.primary:hover { background: var(--plumshadow); }

/* ---------- Two-up (teaching/about) ---------- */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
/* About: text on the left, larger portrait on the right (runs to the links) */
.two-up.about { grid-template-columns: 1fr minmax(300px, 400px); align-items: stretch; gap: clamp(28px, 4vw, 64px); }
.two-up.about .photo-card { max-width: 400px; height: 100%; display: flex; }
.two-up.about .photo-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.courses { display: grid; gap: 1rem; margin-top: 1.6rem; }
.course h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; margin: 0 0 0.2rem; }
.course p { margin: 0; color: var(--charcoal); font-size: 0.96rem; }
.awards { font-weight: 600; font-size: 0.85rem; color: var(--midgray); margin-top: 1.4rem; }

/* ---------- Dark contact band ---------- */
.band-dark { background: var(--plum); color: #fff; position: relative; overflow: hidden; }
.band-dark .eyebrow { color: var(--lav); }
.band-dark h2 { color: #fff; }
.band-dark .email { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 5vw, 3rem); color: #fff; display: inline-block; margin: 0.5rem 0 1.6rem; }
.band-dark .email:hover { color: var(--lav); }
.linkrow { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.linkrow a { font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: #fff; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; padding: 0.45rem 1.1rem; }
.linkrow a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.star { position: absolute; color: #fff; opacity: 0.35; pointer-events: none; }
.star.s1 { top: 14%; left: 6%; width: 26px; } .star.s2 { top: 30%; right: 10%; width: 18px; }
.star.s3 { bottom: 18%; left: 14%; width: 20px; } .star.s4 { bottom: 26%; right: 8%; width: 30px; }

/* ---------- Publications ---------- */
.pub-head { padding: clamp(56px, 8vw, 92px) 0 0; }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.8rem; }
.filters button { font-family: var(--font-body); font-weight: 600; font-size: 0.88rem; cursor: pointer;
  background: var(--wash); color: var(--carbon); border: 1px solid var(--lav); border-radius: 999px; padding: 0.5rem 1.1rem; }
.filters button.active { background: var(--aubergine); color: #fff; border-color: var(--aubergine); }
.publist { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
.publist li { border: 1px solid var(--lav); border-radius: 16px; padding: 1.2rem 1.5rem; background: var(--white); }
.publist .p-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; color: var(--carbon); }
.publist .p-meta { font-size: 0.9rem; color: var(--charcoal); margin-top: 0.4rem; }
.publist .p-meta a { color: var(--aubergine); text-decoration: underline; text-underline-offset: 2px; }

/* colored stream tag chips */
.tag { display: inline-block; margin-top: 0.7rem; font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.06em; padding: 0.22rem 0.7rem; border-radius: 90px; }
.tag.fr { background: var(--wash); color: var(--aubergine); border: 1px solid var(--lav); }
.tag.fj { background: var(--lav); color: var(--plumshadow); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--fog); padding: 2.4rem 0; }
.foot .wrap { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; font-size: 0.85rem; color: var(--midgray); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav-links { gap: 0.9rem; } .nav-links .hide-sm { display: none; }
  .cards3 { grid-template-columns: 1fr; } .cards2 { grid-template-columns: 1fr; }
  .two-up, .two-up.about { grid-template-columns: 1fr; } .two-up .photo-card { order: -1; }
  .two-up.about .photo-card { max-width: 100%; height: auto; display: block; order: 0; }
  .two-up.about .photo-card img { height: auto; object-fit: initial; }
  .newsitem { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
