/* EWAE Unit site styles, shared by index.html, undergraduate.html and graduate.html */
:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --ink: #15211d;
  --ink-2: #4a5a54;
  --line: #d9e0dc;
  --accent: #1f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #dcebe6;
  --hero-1: #0f3d35;
  --hero-2: #1f6b5c;
  --radius: 10px;
  --maxw: 1120px;
  --font-display: Rubik, "Segoe UI", Arial, sans-serif;  /* titles, Latin and Hebrew */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --surface: #161f1c; --surface-2: #1c2723; --ink: #e6ece9; --ink-2: #a3b3ad;
    --line: #2b3833; --accent: #6cc3ad; --accent-ink: #0b1311; --accent-soft: #1d3530;
    --hero-1: #0a2622; --hero-2: #134a40; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513; --surface: #161f1c; --surface-2: #1c2723; --ink: #e6ece9; --ink-2: #a3b3ad;
  --line: #2b3833; --accent: #6cc3ad; --accent-ink: #0b1311; --accent-soft: #1d3530;
  --hero-1: #0a2622; --hero-2: #134a40; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
section { padding: 64px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.lead { color: var(--ink-2); max-width: 70ch; margin: 12px 0 0; }

/* nav */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logos { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logos a { display: block; line-height: 0; border-radius: 4px; }
.logos img { height: 44px; width: auto; display: block; }
.logos .cee img { height: 54px; } /* the CEE image has built-in whitespace */
.logos .sep { width: 1px; height: 32px; background: var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logos .cee { background: #fff; padding: 3px 6px; }
}
:root[data-theme="dark"] .logos .cee { background: #fff; padding: 3px 6px; }
.top nav { display: flex; gap: 20px; overflow-x: auto; margin-inline-start: auto; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .close { display: none; }
.menu-btn[aria-expanded="true"] .open { display: none; }
.menu-btn[aria-expanded="true"] .close { display: block; }

/* hero */
.hero { position: relative; overflow: hidden; background: var(--hero-1); color: #fff; padding: 88px 0 72px; }
.hero > .wrap { position: relative; z-index: 2; }
/* Photo: valley with reservoirs and fields near Nazareth, Israel - Shalev Cohen on Unsplash (Unsplash License). */
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
/* animated version of the photo (camera pan, moving water, turning clarifiers); fades in over the still image */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
.hero-canvas.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(8, 32, 28, .88) 0%, rgba(10, 42, 36, .7) 45%, rgba(15, 61, 53, .25) 100%); }
.credit { position: absolute; inset-inline-end: 12px; bottom: 8px; z-index: 2; font-size: .7rem; color: rgba(255, 255, 255, .7); }
.credit a { color: inherit; }
.hero h1, .hero p { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.hero .eyebrow { color: #a9dccd; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 20ch; }
.hero p { max-width: 62ch; color: #d8ebe5; font-size: 1.08rem; margin: 20px 0 0; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 40px; }
.stats div { border-inline-start: 2px solid #6cc3ad; padding-inline-start: 12px; }
.stats b { display: block; font-size: 1.6rem; font-family: var(--font-display); }
.stats span { color: #bcd9d0; font-size: .85rem; }

/* vision / mission */
.vm { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { margin: 10px 0 0; color: var(--ink-2); }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 32px; }
.pillar { display: flex; flex-direction: column; gap: 12px; }
.pillar .num { font-family: var(--font-display); color: var(--accent); font-size: .95rem; }
.pillar .people { font-size: .9rem; color: var(--ink-2); }
.pillar .people b { color: var(--ink); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.sdg { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 4px; color: #fff; font-size: .75rem; font-weight: 600; }
button.sdg { font: inherit; font-size: .75rem; font-weight: 600; border: 0; cursor: pointer; min-width: 30px; height: 26px; transition: transform .12s, box-shadow .12s; }
button.sdg:hover, button.sdg[aria-expanded="true"] { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
button.sdg:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sdg-pop { position: absolute; z-index: 20; width: min(300px, calc(100vw - 32px)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); overflow: hidden; font-size: .88rem; }
.sdg-pop[hidden] { display: none; }
.sdg-pop .head { color: #fff; padding: 10px 14px; display: flex; align-items: baseline; gap: 10px; }
.sdg-pop .head b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.sdg-pop .head span { font-weight: 600; line-height: 1.25; }
.sdg-pop p { margin: 0; padding: 12px 14px 4px; color: var(--ink-2); }
.sdg-pop a { display: inline-block; padding: 6px 14px 12px; font-size: .8rem; }
.pillar .row { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-2); }

/* interactive planetary boundaries diagram */
.pbx { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; margin-top: 32px; align-items: start; }
.pb-figure { margin: 0; }
.pb-diagram { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pb-diagram img { display: block; width: 100%; height: auto; }
.pb-diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pb-diagram path { fill: transparent; stroke: transparent; stroke-width: 10; cursor: pointer; outline: none; transition: fill .15s, stroke .15s; }
.pb-diagram path:hover { fill: rgba(31, 107, 92, .08); stroke: rgba(31, 107, 92, .5); }
.pb-diagram path:focus-visible { stroke: var(--accent); }
.pb-diagram path.on { fill: rgba(31, 107, 92, .1); stroke: #1f6b5c; stroke-width: 14; }
.pb-figure figcaption { font-size: .75rem; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.pb-detail { position: sticky; top: 88px; }
.pb-detail .card { padding: 24px; }
.pb-close { display: none; }  /* phones only, see the max-width: 640px block */
.pb-detail .num { font-family: var(--font-display); color: var(--accent); font-size: .95rem; }
.pb-detail h3 { font-size: 1.4rem; margin-top: 4px; }
.pb-detail .label { text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 600; color: var(--ink-2); margin-top: 18px; }
.pb-detail .goal { margin: 4px 0 0; color: var(--ink); }
.pb-detail .how { margin: 4px 0 0; }
.pb-detail .faculty { margin: 4px 0 0; color: var(--ink); line-height: 1.8; }
.pb-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pb-list button { font: inherit; font-size: .78rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.pb-list button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* faculty names linked to their lab cards */
.people a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.people a:hover { color: var(--accent); text-decoration-color: currentColor; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 107, 92, 0); } 30% { box-shadow: 0 0 0 6px rgba(31, 107, 92, .45); } }
.lab.ping { animation: ping 1.4s ease 2; }
.lab { scroll-margin-top: 90px; }
/* carousel controls, shown on phones only (see the max-width: 640px block) */
.carousel-nav { display: none; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.carousel-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; }
.carousel-nav button:disabled { opacity: .35; cursor: default; }
.carousel-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.carousel-nav svg { width: 20px; height: 20px; }
.carousel-nav .count { min-width: 64px; text-align: center; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.carousel-nav[hidden] { display: none; }

/* SDGs */
.sdgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 28px; }
.sdgs button { font: inherit; text-align: start; border: 0; cursor: pointer; border-radius: 8px; padding: 12px; color: #fff; font-size: .85rem; line-height: 1.3; min-height: 84px;
  transition: transform .12s, box-shadow .12s, opacity .12s; }
.sdgs button b { display: block; font-size: 1.3rem; font-family: var(--font-display); }
.sdgs button.off { opacity: .28; }
.sdgs button:hover, .sdgs button[aria-expanded="true"] { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); opacity: 1; }
.sdgs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* labs */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filters button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.labs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.lab { height: 400px; perspective: 1200px; cursor: pointer; border-radius: var(--radius); }
.lab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lab[hidden] { display: none; }
.flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s ease-in-out; }
.lab.flipped .flip { transform: rotateY(180deg); }
/* Each side is also hidden outright at the halfway point (card edge-on), because phone browsers can ignore
   backface-visibility inside the scrolling carousel and would otherwise show both sides at once. */
.face { transition: visibility 0s linear .3s; }
.back, .lab.flipped .front { visibility: hidden; }
.lab.flipped .back { visibility: visible; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.lab:hover .face { border-color: var(--accent); }
.front .visual { flex: 1; position: relative; display: grid; place-items: center; color: #fff; overflow: hidden; }
.front .visual svg.icon { width: 84px; height: 84px; position: relative; z-index: 1; }
.front .visual svg.pattern { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .16; }
.front .visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: transform .5s ease; }
.front .visual img.contain { object-fit: contain; background: #fff; padding: 4px; }
.lab:hover .front .visual img:not(.contain) { transform: scale(1.04); }
.front .meta { padding: 16px 18px 18px; }
.front h3 { font-size: 1.08rem; }
.lab .pi { font-size: .9rem; color: var(--accent); font-weight: 500; margin-top: 6px; }
.back { transform: rotateY(180deg); padding: 18px; gap: 10px; }
.back h3 { font-size: 1rem; }
.back .body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.back p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.back .lab-topics { margin: 0; padding-inline-start: 18px; font-size: .86rem; line-height: 1.45; color: var(--ink); }
.back .lab-topics li::marker { color: var(--accent); }
.lab .links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; border-top: 1px solid var(--line); padding-top: 10px; }
.lab .links a { overflow-wrap: anywhere; }
.lab .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .72rem; background: var(--accent-soft); color: var(--ink); padding: 2px 8px; border-radius: 999px; }
.hint { font-size: .75rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.front .hint { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .flip, .face { transition: none; } }

.nowrap { white-space: nowrap; }

footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--ink-2); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 640px) {
  section { padding: 44px 0; }
  .hero { padding: 56px 0 48px; }
  /* phones: the section links collapse into a drop-down opened by the menu button */
  .menu-btn { display: grid; }
  .top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .12); padding: 6px 0; }
  .top nav.open { display: flex; }
  .top nav a { padding: 12px 16px; font-size: 1rem; color: var(--ink); }
  .top nav a + a { border-top: 1px solid var(--line); }
  .logos .brand, .logos .sep { display: none; }
  .top .wrap { gap: 14px; height: 56px; }
  .logos { gap: 10px; }
  .logos img { height: 30px; }
  .logos .cee img { height: 38px; }
  .pbx { grid-template-columns: 1fr; }
  /* phones: the lab and pillar cards become swipe carousels that run to the screen edges, with the next card peeking in */
  .labs, .pillars { position: relative; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px)));
    padding: 4px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
    scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px)); scrollbar-width: none; }
  .labs::-webkit-scrollbar, .pillars::-webkit-scrollbar { display: none; }
  .labs .lab, .pillars .pillar { flex: 0 0 84%; scroll-snap-align: center; scroll-snap-stop: always; }
  .carousel-nav { display: flex; }
  .pb-detail { position: static; }
  /* phones: the selected boundary's card covers the diagram (same height), and the × closes it to show the whole wheel */
  .pbx { position: relative; scroll-margin-top: 72px; }  /* clear the sticky header when scrolled into view */
  .pb-detail .card { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 18px 18px 20px;
    max-height: calc((100vw - max(16px, env(safe-area-inset-left, 0px)) - max(16px, env(safe-area-inset-right, 0px))) * 0.945);
    overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 12px 32px rgba(0, 0, 0, .22); animation: pb-in .2s ease; }
  .pbx.closed .pb-detail .card { display: none; }
  .pb-close { display: grid; place-items: center; position: sticky; top: 0; float: inline-end; margin-block: -6px 6px; margin-inline: 10px -6px;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; z-index: 1; }
  .pb-close svg { width: 18px; height: 18px; }
  .pb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .pb-list { margin-top: 12px; }
  @keyframes pb-in { from { opacity: 0; transform: translateY(6px); } }
  @media (prefers-reduced-motion: reduce) { .pb-detail .card { animation: none; } }
}

/* ---------- program pages (undergraduate.html, graduate.html) ---------- */
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.hero.hero-page { padding: 64px 0 52px; }
.hero.hero-page h1 { max-width: 24ch; }
.crumbs { font-size: .8rem; color: #bcd9d0; margin-bottom: 14px; }
.crumbs a { color: inherit; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.jump a { color: #fff; text-decoration: none; font-size: .85rem; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: 6px 14px; }
.jump a:hover { background: rgba(255, 255, 255, .12); }
section[id] { scroll-margin-top: 72px; }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 28px; }
.prose { max-width: 68ch; }
.prose p { margin: 0 0 14px; color: var(--ink-2); }
.prose ul { margin: 0 0 14px; padding-inline-start: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.facts { display: grid; gap: 14px; }
.facts .card { padding: 20px; }
.facts dl { margin: 0; display: grid; gap: 12px; }
.facts dt { text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 600; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.facts .more { font-weight: 500; }
.note { font-size: .82rem; color: var(--ink-2); }

/* YouTube tiles: poster + play button, swapped for the player on click (see site.js) */
.video, .video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; border: 0; border-radius: var(--radius); }
.video { position: relative; overflow: hidden; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 55%); }
.video .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; z-index: 1; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); transition: transform .2s ease; }
.video .play svg { width: 26px; height: 26px; margin-left: 4px; fill: #0f3d35; }
.video .cap { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.video .cap span { display: block; font-weight: 400; font-size: .8rem; opacity: .85; }
.video:hover img { transform: scale(1.03); }
.video:hover .play { transform: scale(1.06); }
.video:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; }

.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.topics .card { padding: 18px 20px; font-weight: 500; }
.track-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 6px 0 16px; padding: 0; list-style: none; }
.track-areas li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: .92rem; color: var(--ink); }
.list-title { font-size: 1rem; margin: 24px 0 12px; }
.split .track-areas { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.split > div > .lead:first-child { margin-top: 0; }
.facts .degrees { margin: 4px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: .92rem; }
.facts dd.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
a.chip { text-decoration: none; padding: 4px 10px; font-size: .78rem; }
a.chip:hover { background: var(--accent); color: #fff; }

@media (max-width: 640px) {
  .hero.hero-page { padding: 44px 0 36px; }
  .split { grid-template-columns: 1fr; }
}

/* contact us */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.contact { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 20px; }
.contact .role { text-transform: uppercase; letter-spacing: .06em; font-size: .7rem; font-weight: 600; color: var(--accent); }
.contact h3 { font-size: 1.1rem; }
.contact h3 a { color: inherit; text-decoration: none; }
.contact h3 a:hover { color: var(--accent); }
.contact dl { margin: 6px 0 0; display: grid; gap: 8px; }
.contact dt { font-size: .72rem; color: var(--ink-2); }
.contact dd { margin: 1px 0 0; font-size: .92rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------- language switch and right-to-left (Hebrew) pages ---------- */
.lang { flex-shrink: 0; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; background: var(--surface); }
.lang:hover { border-color: var(--accent); }
.lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .lang { margin-inline-start: auto; padding: 4px 10px; }
}

html[lang="he"] body { font-family: Heebo, Inter, system-ui, "Segoe UI", Arial, sans-serif; }
html[lang="he"] .eyebrow, html[lang="he"] .role, html[lang="he"] .deg,
html[lang="he"] .facts dt, html[lang="he"] .pb-detail .label { letter-spacing: 0; }
/* the dark tint sits behind the text, which is on the right in Hebrew */
[dir="rtl"] .hero::after { background: linear-gradient(260deg, rgba(8, 32, 28, .88) 0%, rgba(10, 42, 36, .7) 45%, rgba(15, 61, 53, .25) 100%); }
/* arrows point the reading direction */
[dir="rtl"] .carousel-nav svg { transform: scaleX(-1); }
[dir="rtl"] .grad-card .more::after, [dir="rtl"] .facts .more::after { content: none; }
/* open positions page */
.topics .card b { display: block; margin-bottom: 4px; }
.topics .card .note { margin: 0; }
.pdf-actions { margin-top: 20px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }


/* header: wider than the page content so the logos, seven menu items and language switch fit on one line */
.top .wrap { max-width: 1360px; }
@media (min-width: 1241px) and (max-width: 1400px) {
  .top .wrap { gap: 16px; }
  .top nav { gap: 16px; }
  .top nav a { font-size: .86rem; }
}
/* below ~1240px the menu collapses into the ☰ button (same drop-down as on phones) */
@media (max-width: 1240px) {
  .logos .brand, .logos .sep { display: none; }
  .menu-btn { display: grid; }
  .lang { margin-inline-start: auto; }
  .top nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .12); padding: 6px 0; }
  .top nav.open { display: flex; }
  .top nav a { padding: 12px max(16px, env(safe-area-inset-left, 0px)); font-size: 1rem; color: var(--ink); }
  .top nav a + a { border-top: 1px solid var(--line); }
}
/* PDF pages drawn into the page by PDF.js (site.js) */
.pdf-pages { margin-top: 20px; display: grid; gap: 16px; min-height: 120px; }
.pdf-pages canvas { display: block; width: 100%; height: auto; max-width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.pdf-pages:not(.ready):not(.failed)::before { content: "Loading the document…"; color: var(--ink-2); font-size: .9rem; }
html[lang="he"] .pdf-pages:not(.ready):not(.failed)::before { content: "טוען את המסמך…"; }
.pdf-pages.failed { display: none; }
/* facilities pages: instruments by category, each unit marked departmental or personal */
.fac-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 24px 0; }
.fac-label { font-size: .85rem; color: var(--ink-2); }
.fac-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.fac-filter button { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.fac-filter button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.fcat { padding: 40px 0; }
.fcat:nth-of-type(even) { background: var(--surface-2); }
.fcat .lead { margin-bottom: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 22px; }
.fitem { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; min-width: 0; }
.fitem h3 { font-size: 1.05rem; }
.fitem > p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.units { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.unit { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 4px; min-width: 0; }
.unit.dim { opacity: .35; }
.unit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .88rem; }
.uname { font-weight: 600; }
.owner { color: var(--ink-2); }
.owner a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.owner a:hover { color: var(--accent); }
.fbadge { display: inline-block; font-size: .72rem; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; border: 1px solid transparent; }
.fbadge.dept { background: var(--dept-bg); color: var(--dept-ink); border-color: var(--dept-line); }
.fbadge.personal { background: var(--lab-bg); color: var(--lab-ink); border-color: var(--lab-line); }
.fac-filter button.fbadge { font-size: .85rem; padding: 6px 14px; }
.mail { font-size: .85rem; overflow-wrap: anywhere; justify-self: start; }
.mail.muted { color: var(--ink-2); }
:root { --dept-bg: #e3eef8; --dept-ink: #1d4f7a; --dept-line: #b7d0e8; --lab-bg: #f3ead9; --lab-ink: #6b4a12; --lab-line: #e2cfa6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dept-bg: #16283a; --dept-ink: #a9cdf0; --dept-line: #2a4560; --lab-bg: #2f2615; --lab-ink: #ecd29c; --lab-line: #4d3d1f; } }
:root[data-theme="dark"] { --dept-bg: #16283a; --dept-ink: #a9cdf0; --dept-line: #2a4560; --lab-bg: #2f2615; --lab-ink: #ecd29c; --lab-line: #4d3d1f; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }

/* the logos identify the faculty; the unit's name next to them is hidden so the eight menu items fit */
.logos .brand, .logos .sep { display: none; }
/* phones: the 17 SDG tiles as a 4 x 5 grid - big number, short name (tap a tile for the full goal) */
.sdgs button span { display: block; }
@media (max-width: 640px) {
  .sdgs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sdgs button { aspect-ratio: 1; min-height: 0; padding: 6px 7px; border-radius: 6px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
  .sdgs button b { font-size: 1.15rem; line-height: 1; }
  .sdgs button span { font-size: .58rem; line-height: 1.2; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
