/* ==========================================================================
   Replica of the live ides-unsw.com. Desktop measurements were taken from
   the live site at 1265px content width; positions keyed to the page centre
   reproduce Wix's fixed 980px grid. Mobile below 750px.

   Font: the live site uses Neue Haas Grotesk Display (Adobe Fonts, paid).
   Inter Tight is the free stand-in. To use the real one, add the Adobe Fonts
   kit <link> in src/replica.js and put "neue-haas-grotesk-display" first in
   --sans.
   ========================================================================== */

:root {
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --roboto: "Roboto", Arial, sans-serif;
  --ink: #000;
  --ink-2: #333;
  --bg: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: none; }
a { color: inherit; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

.hd {
  position: relative;
  height: 140px;
  background: var(--bg);
  z-index: 10;
}
.hd-logo { position: absolute; left: 50px; top: 53px; }
.hd-logo img { width: 135px; height: 34px; }
/* Wix pins the nav at a fixed distance from the left at every width. */
.hd-nav {
  position: absolute;
  top: 61px;
  left: 525px;
  display: flex;
  gap: 66px;
}
.hd-nav a {
  font-size: 17px;
  line-height: 17px;
  text-decoration: none;
  white-space: nowrap;
}
.hd-nav a:hover,
.hd-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 2px; }
.hd-burger { display: none; }

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

.ft {
  height: 119px;
  padding-top: 50px;
  text-align: center;
  font-size: 14px;
  line-height: 19.6px;
  letter-spacing: 0.7px;
  color: var(--ink-2);
}

/* --- home ----------------------------------------------------------------- */

.hero {
  position: relative;
  height: 760px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-in { position: relative; padding-top: 203px; }
.hero-welcome {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;
  font-size: 48px;
  line-height: 67.2px;
  font-weight: 700;
  letter-spacing: 2.4px;
  height: 68px;
}
/* Entrance as on the live site: fades in over 0.98s while the blur clears
   over 1.4s. */
.hero-welcome img {
  width: 272px; height: 68px;
  animation:
    sense-fade 980ms cubic-bezier(0.47, 0, 0.745, 0.715) both,
    sense-unblur 1400ms linear both;
}
@keyframes sense-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sense-unblur { from { filter: blur(6px); } to { filter: blur(0); } }
.hero-title {
  margin-top: 38px;
  font-size: 32px;
  line-height: 41.6px;
  font-weight: 500;
  letter-spacing: 1.6px;
}
.hero-lede {
  margin: 23px auto 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: 0.9px;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 40px;
  margin-top: 17px;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-btn:hover { opacity: 0.6; }
.hero-logos {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 21px;
  padding-right: 9px;
}
.hero-logos img { height: 50px; width: auto; }

/* --- page titles ---------------------------------------------------------- */

.pg-title {
  margin: 0 auto;
  font-size: 50px;
  line-height: 70px;
  font-weight: 700;
  text-align: center;
}

/* --- projects ------------------------------------------------------------- */

.pj-title {
  max-width: 600px;
  margin: 48px auto 0;
  font-size: 50px;
  line-height: 60px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-align: center;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 67px 50px 0;
}
.grid-cell { display: block; aspect-ratio: 1; overflow: hidden; }
.grid-cell img { width: 100%; height: 100%; object-fit: cover; }
.pj-cat { margin-top: 284px; text-align: center; padding-bottom: 57px; }

.cat-link {
  font-family: var(--roboto);
  font-size: 16px;
  line-height: 22.4px;
  letter-spacing: 0.8px;
  color: var(--ink-2);
}
.cat-link:hover { opacity: 0.6; }

/* --- project pages -------------------------------------------------------- */
/* Positions are inline, from data/layout.js. */

.pp { position: relative; }
.pp-hero {
  position: absolute; left: 0; top: 0;
  width: 100%;
  object-fit: cover;
  background: #e8e6e6;
}
.pp-portrait {
  position: absolute;
  width: 500px; height: 600px;
  object-fit: cover;
}
.pp-text { position: absolute; width: 767px; }
.pp-by { font-size: 18px; line-height: 25.2px; }
.pp-by span { color: #595959; }
.pp-title { font-size: 60px; line-height: 84px; font-weight: 700; }
.pp-desc {
  margin-top: 50px;
  font-size: 18px;
  line-height: 25.2px;
  color: var(--ink-2);
}
.pp-desc p + p { margin-top: 25.2px; }
.pp-tile { position: absolute; object-fit: cover; }
.pp-btn {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  width: 200px; height: 40px;
  font-size: 15px;
  text-decoration: none;
}
.pp-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.grid-cell:hover img { opacity: 0.85; }

/* --- team ----------------------------------------------------------------- */

.tm-title { max-width: 900px; margin-top: 16px; }
.tm-grid, .y3-grid {
  display: grid;
  grid-template-columns: repeat(4, 330px);
  width: 1320px;
  margin-left: calc(50% - 660px);
}
.tm-grid { margin-top: 70px; row-gap: 232px; padding-bottom: 241px; }
.tm { position: relative; height: 329px; }
.tm-img { width: 330px; height: 329px; object-fit: cover; }
.tm-name {
  margin: 18px 0 0 12px;
  font-size: 25px;
  line-height: 35px;
  font-weight: 700;
  white-space: nowrap;
}
.tm-name a { text-decoration: none; display: block; width: 212px; white-space: normal; }
.tm-lines, .tm-li {
  margin-left: 12px;
  font-size: 15px;
  line-height: 21px;
}
.tm-lines { margin-top: 16px; display: grid; grid-template-rows: repeat(3, 21px); }
.tm-lines a, .tm-lines span { display: block; }
.tm-li { display: block; margin-top: 13px; max-width: 290px; overflow-wrap: anywhere; }
.tm-grid a:hover, .y3-grid a:hover { opacity: 0.6; }

/* --- year 3 --------------------------------------------------------------- */

.y3-title { max-width: 1100px; margin-top: 5px; }
.y3-grid { margin-top: 50px; row-gap: 0; }
.y3 {
  height: 158px;
  padding-left: 10px;
  font-size: 15px;
  line-height: 21px;
}
.y3-name { font-size: 20px; line-height: 24px; font-weight: 700; margin-bottom: 15px; }
.y3 a { display: block; max-width: 290px; overflow-wrap: anywhere; }

/* --- about ---------------------------------------------------------------- */

/* Live layout: the photo slides with the window (a quarter of the extra
   width), and the right half is an opaque white column laid over the
   photo's right edge. The text sits inside it, also sliding. */
.ab { position: relative; height: 693px; }
.ab-img {
  position: absolute;
  top: 34px;
  left: calc(25% - 360px);
  width: 817px;
  height: 659px;
  object-fit: cover;
}
.ab-text {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%; right: 0;
  z-index: 1;
  padding: 76px 0 0 calc(25% - 313px);
  background: var(--bg);
  color: var(--ink-2);
}
.ab-title, .ab-body { max-width: 615px; }
.ab-title {
  max-width: 400px;
  font-size: 32px;
  line-height: 38px;
  font-weight: 700;
  letter-spacing: 1.6px;
}
.ab-body {
  margin-top: 50px;
  font-size: 16px;
  line-height: 22.4px;
  letter-spacing: 0.32px;
}
.ab-body p + p { margin-top: 22.4px; }
.ab-sig small { font-size: 10px; }

/* --- past cohorts --------------------------------------------------------- */

.pc { position: relative; height: 668px; margin-bottom: 42px; }
/* The yellow panel is a third of the window; the text keys off it. */
.pc-img {
  position: absolute; left: 0; top: 0;
  width: 33.333%; height: 668px;
  background: #e8e6e6;
}
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-text { position: absolute; top: 75px; left: calc(66.667% - 326px); }
.pc-title {
  font-family: var(--roboto);
  font-size: 40px;
  line-height: 56px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink-2);
  white-space: nowrap;
}
.pc-cols { display: flex; gap: 84px; margin-top: -2px; }
.pc-cols ul { width: 261px; flex-shrink: 0; }
.pc-cols .cat-link, .pj-cat .cat-link { white-space: nowrap; }
.pc-cols li { height: 34.5px; }

/* --- 404 ------------------------------------------------------------------ */

.nf { padding: 120px 20px 200px; text-align: center; }

/* --- in-between widths: keep the four-up grids inside the viewport -------- */

@media (max-width: 999px) and (min-width: 750px) {
  .tm-grid, .y3-grid { width: calc(100% + 54px); margin-left: -27px; grid-template-columns: repeat(4, 1fr); }
  .tm-img { width: 100%; height: auto; aspect-ratio: 330 / 329; }
  .tm { height: auto; }
  .tm-grid { row-gap: 40px; }
}
@media (max-width: 1100px) and (min-width: 750px) {
  .tm-grid, .y3-grid { width: 100%; margin-left: 0; }
  .ab-img { left: 0; width: 50%; }
  .ab-text { padding: 76px 24px 0; }
  .ab { height: auto; min-height: 693px; }
  .pc-cols { flex-direction: column; gap: 0; }
  .pc { height: auto; min-height: 668px; padding-bottom: 40px; }
  .pc-text { position: relative; left: 0; margin-left: calc(33.333% + 40px); padding-bottom: 40px; }
}

/* Project pages: the 1265px frame doesn't fit, so stack everything.
   !important overrides the inline positions from data/layout.js. */
@media (max-width: 1100px) {
  .pp { height: auto !important; padding-bottom: 32px; }
  .pp > * { position: static !important; }
  .pp-hero { height: auto !important; aspect-ratio: 1265 / 760; }
  .pp-portrait { width: min(500px, 100%) !important; height: auto !important; aspect-ratio: 5 / 6; margin: 50px 0 0 20px; }
  .pp-text { width: auto !important; margin: 32px 20px 0; }
  .pp-tile { display: block; width: calc(100% - 40px) !important; height: auto !important; margin: 20px 20px 0; }
  .pp-btn { display: inline-flex; margin-top: 32px; }
  .pp-next { float: right; }
}

/* --- mobile --------------------------------------------------------------- */

@media (max-width: 749px) {
  .hd { height: 61px; display: flex; align-items: center; justify-content: center; }
  .hd-logo { position: static; }
  .hd-logo img { width: 105px; height: 26px; }
  .hd-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    position: absolute; right: 16px; top: 14px; width: 32px; height: 32px;
  }
  .hd-burger span { display: block; height: 2px; background: var(--ink); }
  .hd-nav {
    display: none;
    position: fixed; inset: 0; top: 0;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 32px;
    background: var(--bg);
  }
  .hd-nav a { font-size: 24px; line-height: 1.2; }
  .nav-open .hd-nav { display: flex; }
  .nav-open .hd-burger { z-index: 20; position: fixed; }
  .nav-open .hd-burger span:nth-child(2) { opacity: 0; }
  .nav-open .hd-burger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav-open .hd-burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  .hero { height: auto; min-height: calc(100svh - 61px); padding: 0 16px 60px; }
  .hero-in { padding-top: 120px; }
  .hero-welcome { flex-direction: column; height: auto; font-size: 26px; line-height: 1.3; letter-spacing: 1px; gap: 0; }
  .hero-welcome img { display: none; }
  .hero-title { margin-top: 88px; font-size: 20px; line-height: 1.4; letter-spacing: 0.5px; font-weight: 600; }
  .hero-lede { margin-top: 14px; font-size: 15px; line-height: 1.5; letter-spacing: 0.4px; }
  .br-d { display: none; }
  .hero-btn { margin-top: 18px; }
  .hero-logos { flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; padding: 0; }
  .hero-logos img:first-child { height: 56px; }
  .hero-logos img:last-child { height: 34px; }

  .pg-title, .pj-title { font-size: 28px; line-height: 1.3; letter-spacing: 0.5px; padding: 0 16px; }
  .pj-title { margin-top: 30px; }
  .grid { grid-template-columns: 1fr; margin: 36px 20px 0; }
  .pj-cat { margin-top: 48px; }

  .tm-grid, .y3-grid { width: auto; margin: 36px 20px 0; grid-template-columns: 1fr; row-gap: 40px; }
  .tm { height: auto; }
  .tm-img { width: 100%; height: auto; aspect-ratio: 330 / 329; }
  .tm-name { margin-left: 0; font-size: 22px; white-space: normal; }
  .tm-lines, .tm-li { margin-left: 0; }
  .y3 { height: auto; padding: 0; }

  .ab, .pc { height: auto; }
  .ab-img, .ab-text, .pc-img, .pc-text { position: static; width: 100%; }
  .pc-text { margin-left: 0; }
  .ab-img { height: auto; aspect-ratio: 817 / 659; margin-top: 0; }
  .ab-text { padding: 32px 20px 0; }
  .pp-title { font-size: 36px; line-height: 1.3; }
  .pp-desc { margin-top: 24px; font-size: 16px; line-height: 1.5; }
  .pp-portrait { margin-left: 0 !important; width: 100% !important; }
  .ab-title { font-size: 26px; line-height: 1.3; }
  .ab-body { margin-top: 24px; }
  .pc-img { height: 360px; }
  .pc-text { padding: 32px 20px 0; }
  .pc-title { font-size: 26px; line-height: 1.35; letter-spacing: 1px; white-space: normal; }
  .pc-cols { flex-direction: column; gap: 0; margin-top: 16px; }

  .ft { height: auto; padding: 50px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-welcome img { animation: none; }
  .hero-bg { display: none; }
  .hero { background: url("/assets/replica/site/hero-poster.jpg") center / cover; }
}
