/*
Theme Name: PNT Lab
Theme URI: https://pnt-labs.co.uk
Author: Pharmaceutical Nanotechnology Laboratories, The University of Manchester
Description: Custom theme for the Pharmaceutical Nanotechnology (PNT) Laboratories. All content — team members, alumni, projects, publications, opportunities and news — is managed from the WordPress admin. Colours follow the PNT logo.
Version: 1.3.3
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pnt-lab
*/

:root{
    /* Colours taken from the PNT logo */
    --purple:#2961a5;        /* logo navy-blue (primary) */
    --purple-deep:#1d4477;   /* darker navy for header/footer */
    --purple-soft:#e6f1fa;   /* very light blue tint */
    --sky:#4aaede;           /* logo light blue */
    --gold:#84ba5a;          /* logo green (accent) */
    --green-deep:#66af5e;
    --ink:#101a24; --muted:#5b6672; --line:#dde6ee;
    --bg:#ffffff; --bg-2:#f5f9fc; --card:#ffffff;
    --link:#2961a5;
    --radius:16px;
    --shadow:0 1px 2px rgba(16,26,36,.04), 0 12px 28px rgba(29,68,119,.07);
    --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  }
  @media (prefers-color-scheme: dark){
    :root{
      --purple-soft:#1b2e42; --ink:#eaf1f7; --muted:#a9b6c3; --line:#2b3a4a;
      --bg:#0f161e; --bg-2:#141d27; --card:#1a2532; --link:#8fcdf0;
      --shadow:0 6px 24px rgba(0,0,0,.35);
    }
  }
  *{box-sizing:border-box}
  /* Anchor links jump straight to the section. Smooth scrolling animated the
     whole page past every section in between, which on a page this long reads
     as a lurch rather than a transition. scroll-padding keeps the target clear
     of the sticky header. */
  html{scroll-behavior:auto;scroll-padding-top:96px}
  body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.6;font-size:16.5px;-webkit-font-smoothing:antialiased}
  a{color:var(--link)}
  img{max-width:100%;display:block}
  .wrap{max-width:1080px;margin:0 auto;padding:0 20px}

  /* ---- header / nav ---- */
  .topbar{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.9);backdrop-filter:blur(12px);color:var(--purple-deep);border-bottom:1px solid var(--line)}
  .topbar:after{content:"";display:block;height:2px;background:linear-gradient(90deg,var(--purple-deep),var(--sky) 55%,var(--gold))}
  .topbar .wrap{display:flex;align-items:center;justify-content:space-between;height:84px;gap:12px}
  .brand{display:flex;align-items:center;color:var(--purple-deep);text-decoration:none}
  .brand .logo{height:64px;width:auto}
  .brandtext{display:none}
  .menu{display:flex;gap:2px;list-style:none;margin:0;padding:0}
  .menu a{position:relative;color:var(--purple-deep);text-decoration:none;padding:8px 11px;border-radius:8px;font-size:.92rem;font-weight:600}
  .menu a:after{content:"";position:absolute;left:11px;right:11px;bottom:2px;height:2px;background:var(--gold);transform:scaleX(0);transform-origin:left;transition:transform .2s ease}
  .menu a:hover:after,.menu a.active:after{transform:scaleX(1)}
  .menu a.active{color:var(--purple)}
  /* Dropdowns. The bar was 12 items wide and wrapping; grouping keeps every
     page reachable from one row. */
  .menu li{position:relative}
  .menu .sub-menu{list-style:none;margin:0;padding:6px;position:absolute;top:calc(100% + 6px);left:0;
    min-width:230px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);
    box-shadow:0 12px 26px rgba(15,32,55,.16);z-index:130;
    opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .16s ease,transform .16s ease,visibility .16s}
  .menu li:hover > .sub-menu,
  .menu li:focus-within > .sub-menu,
  .menu li.pnt-open > .sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
  .menu .sub-menu a{display:block;padding:9px 12px;border-radius:8px;font-weight:600;white-space:nowrap}
  .menu .sub-menu a:after{display:none}
  .menu .sub-menu a:hover,.menu .sub-menu a:focus-visible{background:var(--bg-2);color:var(--purple)}
  /* A chevron marks the items that open. */
  .menu .menu-item-has-children > a{padding-right:24px}
  .menu .menu-item-has-children > a:before{content:"";position:absolute;right:9px;top:calc(50% - 2px);
    width:6px;height:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
    transform:rotate(45deg);opacity:.65}
  .burger{display:none;background:none;border:0;color:var(--purple-deep);font-size:1.9rem;line-height:1;padding:6px 8px;cursor:pointer}
  @media(max-width:900px){
    .burger{display:block}
    .topbar .wrap{height:72px}
    .brand .logo{height:52px}
    .menu{display:none;position:absolute;left:0;right:0;top:72px;background:#fff;flex-direction:column;padding:8px 12px 14px;border-bottom:4px solid var(--gold);box-shadow:0 10px 20px rgba(0,0,0,.12)}
    .menu.open{display:flex}
    .menu a{padding:12px 10px;font-size:1.05rem}
    /* Inside the burger panel there is no hover, so nest the children inline. */
    .menu .sub-menu{position:static;opacity:1;visibility:visible;transform:none;
      box-shadow:none;border:0;border-left:2px solid var(--line);border-radius:0;
      margin:0 0 4px 12px;padding:0 0 0 6px;min-width:0}
    .menu .sub-menu a{font-size:.98rem;padding:10px}
    .menu .menu-item-has-children > a:before{display:none}
  }

  /* ---- hero ---- */
  .hero{color:#fff;padding:88px 0 78px;position:relative;overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat}
  .hero .wrap{position:relative}
  .herologo{background:#fff;border-radius:14px;padding:12px 18px;display:inline-block;margin-bottom:22px;max-width:min(420px,100%)}
  .herologo img{height:auto;width:100%}
  .eyebrow{font-family:var(--mono);font-size:.71rem;letter-spacing:.2em;text-transform:uppercase;color:rgba(255,255,255,.88);margin:0 0 14px}
  .hero h1{font-size:clamp(2.05rem,5vw,3.35rem);line-height:1.1;margin:0 0 16px;font-weight:800;letter-spacing:-.02em;max-width:20ch}
  .hero p.sub{font-size:clamp(1.02rem,2.1vw,1.18rem);max-width:62ch;color:rgba(255,255,255,.94);margin:0 0 30px}
  .btn{display:inline-block;padding:12px 22px;border-radius:8px;font-weight:600;text-decoration:none;font-size:.94rem;border:2px solid transparent;transition:transform .16s ease,box-shadow .16s ease,background .16s}
  .btn.primary{background:var(--gold);color:#fff;box-shadow:0 6px 18px rgba(132,186,90,.32)}
  .btn.primary:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(132,186,90,.42)}
  .btn.ghost{border-color:rgba(255,255,255,.75);color:#fff}
  .btn.ghost:hover{background:rgba(255,255,255,.12)}
  .btn.outline{border-color:var(--purple);color:var(--link)}
  .btn.outline:hover{background:var(--purple-soft)}
  .btn.solid{background:var(--purple);color:#fff}
  .btn.solid:hover{background:var(--purple-deep)}
  .btnrow{display:flex;flex-wrap:wrap;gap:10px}
  .stats{display:flex;flex-wrap:wrap;margin-top:40px;border:1px solid rgba(255,255,255,.28);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.1);backdrop-filter:blur(6px)}
  .stat{padding:14px 24px;min-width:130px;border-right:1px solid rgba(255,255,255,.22)}
  .stat:last-child{border-right:0}
  .stat b{display:block;font-size:1.7rem;line-height:1.15;font-variant-numeric:tabular-nums}
  .stat span{font-family:var(--mono);font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;opacity:.88}

  /* ---- sections ---- */
  section{padding:74px 0}
  section.alt{background:var(--bg-2)}
  .sec-head{margin-bottom:30px;padding-left:16px;border-left:3px solid var(--gold)}
  .sec-head h2{font-size:clamp(1.5rem,3.3vw,2.05rem);margin:6px 0 8px;letter-spacing:-.015em}
  .sec-head p{margin:0;color:var(--muted);max-width:70ch}
  .sec-head .idx{font-family:var(--mono);font-size:.71rem;letter-spacing:.2em;text-transform:uppercase;color:var(--purple);opacity:.8;display:block}
  .grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
  .card{position:relative;overflow:hidden;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow);transition:transform .18s ease,box-shadow .18s ease,border-color .18s}
  .card:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--purple),var(--sky));opacity:0;transition:opacity .18s}
  .card:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(29,68,119,.13);border-color:#cbdcec}
  .card:hover:before{opacity:1}
  .card h3{margin:0 0 8px;font-size:1.05rem}
  .card p{margin:0;color:var(--muted);font-size:.95rem}
  .card .icon{width:44px;height:44px;border-radius:12px;background:linear-gradient(150deg,#e8f3fb,#eef7e6);border:1px solid #dcebf6;display:grid;place-items:center;margin-bottom:14px;color:var(--purple);font-size:1.2rem}

  /* ---- team ---- */
  .subhead{font-family:var(--mono);font-size:.7rem;letter-spacing:.16em;text-transform:uppercase;color:var(--purple);margin:34px 0 14px;font-weight:700}
  .subhead:first-of-type{margin-top:0}
  .people{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
  .person{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px 16px;text-align:center;box-shadow:var(--shadow);transition:transform .18s ease,box-shadow .18s}
  .person:hover{transform:translateY(-3px);box-shadow:0 16px 34px rgba(29,68,119,.14)}
  .person.pi{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:20px;text-align:left;align-items:center;background:linear-gradient(135deg,#eef6fc,var(--card))}
  @media(max-width:560px){.person.pi{grid-template-columns:1fr;text-align:center;justify-items:center}}
  .avatar{width:84px;height:84px;border-radius:50%;margin:0 auto 12px;display:grid;place-items:center;font-weight:700;font-size:1.5rem;color:#fff;overflow:hidden;background:var(--purple);box-shadow:0 0 0 3px #fff,0 0 0 5px rgba(74,174,222,.35)}
  .person.pi .avatar{width:110px;height:110px;font-size:2rem;margin:0}
  .avatar img{width:100%;height:100%;object-fit:cover}
  .person h3{margin:0;font-size:1rem}
  .person .role{color:var(--purple);font-weight:600;font-size:.82rem;margin:3px 0 9px}
  @media (prefers-color-scheme: dark){.person .role{color:#8fcdf0}}
  .person .topic{color:var(--muted);font-size:.88rem;margin:0}
  .person .links{margin-top:8px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
  .person.pi .links{justify-content:flex-start}
  @media(max-width:560px){.person.pi .links{justify-content:center}}
  .person .links a{font-size:.8rem;text-decoration:none;border:1px solid var(--line);padding:3px 9px;border-radius:999px;color:var(--link)}
  .person .links a:hover{background:var(--purple-soft);border-color:var(--purple)}
  .person .links a.more{border-color:var(--purple);font-weight:600}
  .person h3 a{color:inherit;text-decoration:none}
  .person h3 a:hover{text-decoration:underline}
  .avatar-link{display:block;text-decoration:none}
  .person.pi .avatar-link{flex:0 0 auto}

  /* ---- alumni table ---- */
  .tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow)}
  table{width:100%;border-collapse:collapse;font-size:.94rem;min-width:520px}
  th,td{padding:12px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
  th{background:#eaf2fa;font-family:var(--mono);font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--purple)}
  @media (prefers-color-scheme: dark){th{color:#8fcdf0}}
  tr:last-child td{border-bottom:0}
  .tag{display:inline-block;font-size:.7rem;padding:3px 10px;border-radius:999px;background:#eaf2fa;color:var(--purple);font-weight:600;letter-spacing:.06em;text-transform:uppercase}
  @media (prefers-color-scheme: dark){.tag{color:#8fcdf0}}

  /* ---- publications ---- */
  .pubs{list-style:none;margin:0;padding:0;display:grid;gap:10px}
  .pubs li{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:15px 18px;display:grid;grid-template-columns:58px 1fr;gap:14px;align-items:start;transition:border-color .18s,box-shadow .18s}
  .pubs li:hover{border-color:#cbdcec;box-shadow:var(--shadow)}
  .pubs .yr{font-family:var(--mono);font-weight:600;color:var(--purple);font-size:.95rem}
  @media (prefers-color-scheme: dark){.pubs .yr{color:#8fcdf0}}
  .pubs .t{font-weight:600;margin:0 0 2px}
  .pubs .m{color:var(--muted);font-size:.9rem;margin:0}

  /* ---- opportunities / news ---- */
  .opps{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
  .opp{background:var(--card);border:1px solid var(--line);border-left:5px solid var(--gold);border-radius:12px;padding:18px}
  .opp h3{margin:0 0 4px;font-size:1.05rem}
  .opp .meta{color:var(--muted);font-size:.85rem;margin:0 0 8px}
  .opp p{margin:0 0 10px;font-size:.95rem}
  .empty{background:var(--card);border:1px dashed var(--line);border-radius:12px;padding:20px;color:var(--muted)}
  .news{list-style:none;margin:0;padding:0;display:grid;gap:8px}
  .news li{display:grid;grid-template-columns:100px 1fr;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
  .news time{color:var(--muted);font-size:.85rem}
  .linkedin-cta{margin-top:22px;background:linear-gradient(135deg,var(--purple-deep),var(--purple));color:#fff;border-radius:var(--radius);padding:22px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
  .linkedin-cta p{margin:0;max-width:60ch}

  /* ---- logos / funders ---- */
  .logos{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch}
  .logo-item{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 18px;font-weight:600;font-size:.9rem;display:flex;align-items:center;justify-content:center;min-height:84px;color:var(--ink);text-decoration:none}
  .logo-item img{height:56px;width:auto;max-width:220px;object-fit:contain}
  @media(max-width:560px){.logo-item{min-height:70px;padding:10px 14px}.logo-item img{height:44px;max-width:160px}}
  /* ---- gallery ---- */
  .gallery{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
  .gallery figure{margin:0;border-radius:var(--radius);overflow:hidden;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow)}
  .gallery img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;display:block;transition:transform .25s ease}
  .gallery a{display:block;overflow:hidden;cursor:zoom-in}
  .gallery a:hover img{transform:scale(1.04)}
  .gallery figcaption{padding:10px 14px;font-size:.88rem;color:var(--muted)}

  /* Alumni keep a small portrait beside the name when one has been supplied. */
  .alum-name{display:flex;align-items:center;gap:10px}
  .alum-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none;
    box-shadow:0 0 0 2px var(--bg),0 0 0 3px rgba(74,174,222,.35)}
  /* Alumni with no photo get an initials disc, matching the team grid. */
  .alum-avatar.initials{display:grid;place-items:center;color:#fff;font-weight:700;
    font-size:.74rem;letter-spacing:.02em}

  /* ---- photo lightbox (Lab life) ---- */
  html.pnt-lb-open{overflow:hidden}
  /* `display:flex` would otherwise beat the hidden attribute and leave an
     invisible overlay swallowing clicks on the page beneath. */
  .pnt-lb[hidden]{display:none}
  .pnt-lb{
    /* Above the WordPress admin bar (z-index 99999), so the close button is
       never hidden behind it for logged-in editors. */
    position:fixed; inset:0; z-index:100100;
    display:flex; align-items:center; justify-content:center;
    padding:clamp(12px,4vw,48px);
    background:rgba(9,16,24,.92);
    -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  }
  .pnt-lb-frame{
    margin:0; max-width:100%; max-height:100%;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  }
  .pnt-lb-frame img{
    max-width:100%; max-height:78vh; width:auto; height:auto;
    border-radius:10px; box-shadow:0 24px 60px rgba(0,0,0,.5);
    background:#0f161e; transition:opacity .2s ease;
  }
  .pnt-lb.loading .pnt-lb-frame img{opacity:.35}
  .pnt-lb-frame figcaption{
    color:rgba(255,255,255,.9); font-size:.94rem; text-align:center;
    max-width:64ch; text-wrap:balance;
  }
  .pnt-lb button{
    position:absolute; display:grid; place-items:center; cursor:pointer;
    background:rgba(255,255,255,.1); color:#fff;
    border:1px solid rgba(255,255,255,.28); border-radius:50%;
    transition:background .15s ease, border-color .15s ease, transform .15s ease;
  }
  .pnt-lb button:hover{background:rgba(255,255,255,.22); border-color:rgba(255,255,255,.5)}
  .pnt-lb button:focus-visible{outline:3px solid var(--gold); outline-offset:3px}
  .pnt-lb button svg{width:24px; height:24px}
  .pnt-lb-close{top:clamp(10px,2.5vw,22px); right:clamp(10px,2.5vw,22px); width:46px; height:46px}
  .pnt-lb-nav{top:50%; margin-top:-25px; width:50px; height:50px}
  .pnt-lb-nav.prev{left:clamp(6px,2vw,22px)}
  .pnt-lb-nav.next{right:clamp(6px,2vw,22px)}
  @media(max-width:640px){
    .pnt-lb-nav{width:42px; height:42px; margin-top:-21px}
    .pnt-lb-frame img{max-height:66vh}
  }
  @media(prefers-reduced-motion:reduce){
    .pnt-lb button, .pnt-lb-frame img{transition:none}
  }

  /* ---- contact / footer ---- */
  .contact{display:grid;gap:20px;grid-template-columns:1fr 1fr}
  @media(max-width:700px){.contact{grid-template-columns:1fr}}
  address{font-style:normal;line-height:1.7}
  footer{background:var(--purple-deep);color:rgba(255,255,255,.8);font-size:.85rem;padding:26px 0}
  footer a{color:#fff}
  .totop{position:fixed;right:16px;bottom:16px;width:44px;height:44px;border-radius:50%;background:var(--purple);color:#fff;display:grid;place-items:center;text-decoration:none;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:.2s}
  .totop.show{opacity:1;pointer-events:auto}

  /* ---- projects page ---- */
  .pagehead{background:linear-gradient(135deg,var(--purple-deep),var(--purple) 60%,var(--sky));color:#fff;padding:44px 0}
  .pagehead h1{margin:0 0 6px;font-size:clamp(1.7rem,4vw,2.5rem)}
  .pagehead p{margin:0;opacity:.92;max-width:65ch}
  /* Conference cards: a photo beside the details, stacking on narrow screens.
     Deliberately distinct from .gallery, which stays purely social. */
  /* Featured image on a news post, above the text. Graphical abstracts are
     wide and detailed, so show the whole thing rather than cropping. */
  .post-shot{margin:0 0 22px;border:1px solid var(--line);border-radius:var(--radius);
    overflow:hidden;background:var(--bg-2);line-height:0}
  .post-shot img{width:100%;height:auto;display:block;cursor:zoom-in}

  /* Research theme schematics. These are transparent PNGs carrying dark navy
     labels, so the panel behind them must stay light in BOTH colour schemes —
     var(--bg-2) flips to near-black in dark mode and would swallow the text. */
  .theme-shot{margin:0 0 28px;border:1px solid var(--line);border-radius:var(--radius);
    overflow:hidden;background:#ffffff;line-height:0;padding:10px}
  .theme-shot img{width:100%;height:auto;display:block;cursor:zoom-in}
  /* The panel stays white in both schemes, so the caption needs its own colour
     rather than inheriting one that assumes the page background. */
  .theme-shot figcaption{background:#ffffff;color:#5b6672;font-size:.9rem;line-height:1.5;
    text-align:center;padding:4px 10px 8px}

  /* A row of photographs inside a news post — two side by side on a wide
     screen, stacked on a phone. Used where one picture would not tell the
     whole story, e.g. two people presenting at the same conference. */
  .post-figs{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0}
  .post-figs figure{margin:0;border:1px solid var(--line);border-radius:var(--radius);
    overflow:hidden;background:var(--bg-2)}
  .post-figs img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;display:block;
    cursor:zoom-in;border-radius:0;margin:0}
  .post-figs figcaption{padding:10px 12px;color:var(--muted);font-size:.86rem;line-height:1.45}
  @media(max-width:640px){ .post-figs{grid-template-columns:1fr} }
  .pagehead .eyebrow a{color:rgba(255,255,255,.92)}

  /* Research themes: the schematic sits beside its own description rather than
     behind a link, so the science is visible without a click. The figures are
     dense, so they get roughly half the row and open full size in the overlay. */
  /* The wide overview graphic above the themes. It is a banner, not a card, so
     it runs the full column width and carries a little more breathing room. */
  .theme-shot.overview{margin:0 0 30px;padding:18px}
  @media(max-width:700px){ .theme-shot.overview{padding:10px} }
  .themes{display:grid;gap:22px}
  .theme-row{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
    box-shadow:var(--shadow);display:grid;grid-template-columns:minmax(0,40%) 1fr;
    gap:0;overflow:hidden;align-items:center}
  .theme-row .theme-shot{margin:0;border:0;border-radius:0;padding:16px}
  .theme-row .theme-body{padding:26px 28px}
  /* Icon and a running number side by side, so the six themes read as a set at
     a glance rather than as six unrelated blocks. */
  .theme-row .theme-mark{display:flex;align-items:center;gap:12px;margin-bottom:12px}
  .theme-row .theme-mark .icon{margin:0}
  .theme-row .theme-mark .num{font-family:var(--mono);font-size:1.25rem;font-weight:700;
    color:var(--purple);opacity:.28;line-height:1;font-variant-numeric:tabular-nums}
  .theme-row .theme-body h3{margin:0 0 8px;font-size:1.15rem}
  .theme-row .theme-body p{margin:0 0 10px;color:var(--muted);font-size:.95rem}
  .theme-row .theme-body p:last-child{margin-bottom:0}
  /* Selected papers: a quick way through to the evidence behind each theme. */
  .theme-pubs{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
  .theme-pubs h4{margin:0 0 8px;font-family:var(--mono);font-size:.68rem;letter-spacing:.14em;
    text-transform:uppercase;color:var(--muted);font-weight:700}
  .theme-pubs ul{list-style:none;margin:0;padding:0}
  .theme-pubs li{margin:0 0 6px;font-size:.88rem;line-height:1.45}
  .theme-pubs li:last-child{margin-bottom:0}
  .theme-pubs a{text-decoration:none}
  .theme-pubs a:hover{text-decoration:underline}
  /* The year sits outside the link and is separated, so it never reads as part
     of the paper's title. white-space:nowrap keeps the dot with the number. */
  .theme-pubs .yr{color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
  .theme-pubs .yr:before{content:"· "}
  .theme-row.no-shot{grid-template-columns:1fr}
  @media(max-width:820px){
    .theme-row{grid-template-columns:1fr}
    .theme-row .theme-body{padding:20px 22px}
  }

  /* Extra session photos are links the lightbox collects, not visible content:
     hidden from sight but kept in the document (not display:none on a focusable
     element's ancestor chain in a way that breaks it — they are decorative
     duplicates of the visible photo's story). */
  .conf-extra{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
    clip-path:inset(50%);white-space:nowrap}
  .conf-shot{position:relative}
  .conf-count{position:absolute;right:10px;bottom:10px;background:rgba(29,68,119,.85);color:#fff;
    font-family:var(--mono);font-size:.7rem;font-weight:700;letter-spacing:.04em;
    padding:3px 8px;border-radius:999px;pointer-events:none}
  .confs{display:grid;gap:16px}
  .conf{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
    box-shadow:var(--shadow);display:grid;grid-template-columns:320px 1fr;gap:0;overflow:hidden}
  @media(max-width:700px){
    .conf{grid-template-columns:1fr}
    /* Stacked, the photo would otherwise run the full height of its source. */
    .conf-shot img{height:auto;aspect-ratio:4/3;max-height:300px;object-fit:contain}
  }
  .conf-shot{line-height:0;background:var(--bg-2)}
  .conf-shot a{display:block;overflow:hidden;cursor:zoom-in;height:100%}
  /* `contain`, not `cover`: these are posters, certificates and wide room
     shots, and a cover crop zoomed so far in that the people disappeared.
     Show the whole image, letterboxed on the card's own background. */
  .conf-shot img{width:100%;height:100%;min-height:190px;object-fit:contain;display:block;
    padding:10px;background:var(--bg-2);transition:transform .25s ease}
  .conf-shot a:hover img{transform:scale(1.04)}
  .conf-body{padding:20px 22px;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
  .conf-body h3{margin:2px 0 0;font-size:1.05rem}
  .conf-who{margin:0;font-weight:600;color:var(--ink)}
  .conf-body .meta{margin:0;font-family:var(--mono);font-size:.82rem;color:var(--muted)}
  .conf-body .desc{margin:4px 0 0}
  .conf-body .more{margin-top:auto;padding-top:8px;font-weight:600}

  .projects{display:grid;gap:14px}
  .project{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px 22px;box-shadow:var(--shadow);display:grid;grid-template-columns:110px 1fr;gap:16px}
  @media(max-width:600px){.project{grid-template-columns:1fr}}
  .project .years{font-family:var(--mono);font-weight:600;color:var(--purple);font-size:.95rem}
  @media (prefers-color-scheme: dark){.project .years{color:#8fcdf0}}
  .project h3{margin:0 0 6px;font-size:1.08rem}
  .project .funder{color:var(--muted);font-size:.92rem;margin:0 0 8px}
  .project .desc{margin:0 0 10px;font-size:.95rem}
  .project .tags{display:flex;flex-wrap:wrap;gap:6px}
  .tag.green{background:#eef7e6;color:#4c7a2c}
  @media (prefers-color-scheme: dark){.tag.green{background:#22331b;color:#a9dd8c}}
  .project .logo-small{height:34px;width:auto;margin-top:10px;background:#fff;border-radius:6px;padding:3px 6px}

/* ================= WordPress-specific additions ================= */
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed;left:12px;top:12px;z-index:999;background:#fff;color:var(--purple-deep);padding:10px 16px;border-radius:8px;width:auto;height:auto;clip:auto}
.admin-bar .topbar{top:32px}
@media(max-width:782px){.admin-bar .topbar{top:46px}}
.alignleft{float:left;margin:0 20px 14px 0}
.alignright{float:right;margin:0 0 14px 20px}
.aligncenter{margin-left:auto;margin-right:auto}
.wp-caption-text,figcaption{color:var(--muted);font-size:.88rem}

/* prose pages: single posts, pages, news archive */
.prose{max-width:760px}
.prose h1{font-size:clamp(1.7rem,4vw,2.4rem);margin:0 0 10px;line-height:1.2}
.prose h2{font-size:1.35rem;margin:30px 0 10px}
.prose h3{font-size:1.1rem;margin:24px 0 8px}
.prose p,.prose ul,.prose ol{margin:0 0 16px}
.prose img{border-radius:12px;margin:18px 0}
.prose blockquote{margin:18px 0;padding:12px 18px;border-left:4px solid var(--gold);background:var(--bg-2);border-radius:0 10px 10px 0}
.prose code{background:var(--bg-2);padding:2px 6px;border-radius:5px;font-size:.92em}
.meta-line{color:var(--muted);font-size:.9rem;margin:0 0 22px}
.newslist{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.newscard{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}
.newscard img{width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:var(--bg-2);padding:8px;display:block}
.newscard .body{padding:16px 18px}
.newscard h3{margin:0 0 6px;font-size:1.05rem}
.newscard time{color:var(--muted);font-size:.82rem}
.newscard p{color:var(--muted);font-size:.93rem;margin:8px 0 0}
.pagination{display:flex;gap:8px;flex-wrap:wrap;margin-top:26px}
.pagination .page-numbers{border:1px solid var(--line);border-radius:8px;padding:7px 13px;text-decoration:none;color:var(--link);background:var(--card)}
.pagination .page-numbers.current{background:var(--purple);color:#fff;border-color:var(--purple)}
.memberpage{display:grid;grid-template-columns:260px 1fr;gap:30px;align-items:start}
@media(max-width:640px){.memberpage{grid-template-columns:1fr}}
.memberpage .shot{width:100%;max-width:260px;border-radius:var(--radius);border:3px solid var(--gold);overflow:hidden;line-height:0;background:var(--bg-2)}
.memberpage .shot img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover;object-position:center top}
.person h3 a,.newscard h3 a,.pubs .t a{color:inherit;text-decoration:none}
.person h3 a:hover,.newscard h3 a:hover,.pubs .t a:hover{text-decoration:underline}

/* member detail list */
dl.timeline{margin:22px 0 0}
dl.timeline div{display:grid;grid-template-columns:150px 1fr;gap:10px;padding:9px 0;border-bottom:1px dotted var(--line)}
@media(max-width:520px){dl.timeline div{grid-template-columns:1fr;gap:2px}}
dl.timeline dt{font-weight:700;color:var(--muted);font-size:.85rem;letter-spacing:.04em;text-transform:uppercase}
dl.timeline dd{margin:0}
