/* ---------------------------------------------------------------------------
   personal.css
   Local overrides for a personal page using the University of Glasgow 2026
   ("3t4") stylesheet. Loaded AFTER https://www.gla.ac.uk/3t4/css/main.css.

   Two things to know before editing:

   1. T4 draws list bullets in more than one way (a background-image on the li,
      and/or a ::before pseudo-element, depending on context). If you add your
      own bullet without switching BOTH off you get two bullets per item. The
      "bullet reset" block below switches both off; anything that wants a
      bullet then draws exactly one.

   2. T4's .row / .standardContent / .maincontent each carry generous padding.
      Stacking one .row per section multiplies that padding into a lot of dead
      space, which is why main.html now uses a single .row for all the text
      sections.
   --------------------------------------------------------------------------- */

:root {
  --uofg-blue:   #003865;
  --uofg-rose:   #7d2239;
  --uofg-muted:  #5c6771;
  --uofg-line:   #e2e6ea;
  --uofg-tint:   #f4f6f8;
  --radius:      4px;
}

/* ============================================================ BULLET RESET */
/* Applies to every list this stylesheet is responsible for. Kills T4's
   background-image bullets, its ::before bullets, and the native marker. */

.linklist,
.plainlist,
.tileText ul {
  list-style: none !important;
  margin-left: 0;
  padding-left: 0;
}

.linklist > li,
.plainlist > li,
.tileText ul > li {
  list-style: none !important;
  background-image: none !important;
  background: none;
  padding-left: 0;
  margin-left: 0;
  text-indent: 0;
}

.linklist > li::marker,
.plainlist > li::marker,
.tileText ul > li::marker {
  content: "";
  font-size: 0;
}

.plainlist > li::before,
.tileText ul > li::before {
  content: none !important;
  display: none !important;
}

/* ============================================================ HEADER LOGO */
/* The logo imgs keep their T4 ids so the scroll swap keeps working, and sit in
   <picture> wrappers so T4's src rewrite can't break them (see the comment in
   PPE-template2026.php).

   The <picture> wrapper is a new element in T4's expected DOM, so make sure it
   is transparent to layout - it must not become a box that keeps a hidden logo
   taking up space. Hiding is driven by the img, so the wrapper collapses with
   it. */

#header-logo picture {
  display: contents;
}

#header-logo img.gu-logo {
  max-width: 100%;
  height: auto;
}

/* ============================================================ PAGE HEADING */

#page-heading .postnominals {
  font-size: 0.5em;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0.85;
  white-space: nowrap;
}

/* 3rem matches where T4 starts the section-navigation panel, so the title and
   strapline line up with the column below them. (T4's own .main-feature hero
   does this by padding the h1 only, which left the strapline hanging out at the
   far left - and it uppercases the h1.) */
#section-header.page-header {
  min-height: 0;
  background-image: none;
  padding: 1.25rem 3rem 0.25rem 3rem;
}

#section-header.page-header h1 {
  margin: 0 0 0.25rem 0;
  padding-left: 0;
  text-transform: none;
}

#section-header.page-header .page-strapline {
  margin-left: 0;
}

@media screen and (max-width: 39.9375em) {
  #section-header.page-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.page-strapline {
  max-width: 46em;
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* ============================================================== SPACING */
/* One .row now wraps all the text sections, so the breathing room between
   sections is set here rather than inherited from nine stacked rows. */

.personal-section {
  scroll-margin-top: 120px;   /* clears the sticky T4 header on anchor jumps */
}

.personal-section + .personal-section {
  margin-top: 2rem;
}

.personal-section h2.unresponsivestyle {
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 3px solid var(--uofg-blue);
}

.personal-section h3 {
  margin-top: 1.35rem;
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
  color: var(--uofg-blue);
}

.personal-section p {
  margin-bottom: 0.75rem;
}

/* Our own content blocks. Plain columns, so no inherited T4 panel decoration
   (that decoration is what gave the profile block a non-rectangular edge). */
.personal-row {
  margin-bottom: 0.5rem;
}

.personal-main-inner {
  padding-bottom: 0.5rem;
  background: none;
  border: 0;
  clip-path: none;
}

/* ============================================================ PROFILE CARD */

/* T4's .maincontent-inner supplied a grey card here. We no longer use that
   class (its card wrapped unevenly around the floated side column, which is
   what made the profile block look non-rectangular), so the card is drawn
   here instead - on a single flex container, so it stays a clean rectangle. */
.profile-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--uofg-tint);
  border-radius: var(--radius);
  padding: 1.5rem;
}

@media screen and (max-width: 39.9375em) {
  .profile-card { padding: 1rem; }
}

.profile-photo {
  flex: 0 0 auto;
  width: 170px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--uofg-line);
  box-shadow: 0 2px 14px -6px rgba(0, 0, 0, 0.35);
}

.profile-intro {
  flex: 1 1 300px;
  min-width: 240px;
}

.profile-intro p {
  font-size: 1.05rem;
  line-height: 1.55;
}

.profile-intro p:last-child { margin-bottom: 0; }

@media screen and (max-width: 39.9375em) {
  .profile-card { gap: 1rem; }
  .profile-photo { width: 128px; }
}

/* =================================================== CONTACT / SIDE COLUMN */

.sidecol { padding-top: 0.25rem; }

.contact-card,
.quicklinks-card {
  background: var(--uofg-tint);
  border-left: 4px solid var(--uofg-blue);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.quicklinks-card { border-left-color: var(--uofg-rose); }

.contact-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--uofg-muted);
}

.contact-card address {
  font-style: normal;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.contact-card .plainlist > li,
.quicklinks-card .plainlist > li {
  padding: 0.28rem 0;
  border-top: 1px solid var(--uofg-line);
  line-height: 1.4;
  word-break: break-word;
}

.contact-card .plainlist > li:first-child,
.quicklinks-card .plainlist > li:first-child {
  border-top: 0;
}

.contact-label {
  display: inline-block;
  min-width: 4.6em;
  font-weight: 700;
  color: var(--uofg-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.muted { color: var(--uofg-muted); font-size: 0.9em; }

/* ============================================================= LINK LISTS */
/* Exactly one bullet: this ::before, drawn after the reset above. */

ul.linklist {
  margin: 0.35rem 0 0;
}

ul.linklist > li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.05rem !important;
  border-bottom: 1px solid var(--uofg-line);
  line-height: 1.45;
}

ul.linklist > li:last-child { border-bottom: 0; }

ul.linklist > li::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uofg-rose);
}

ul.linklist .arrow {
  color: var(--uofg-muted);
  padding: 0 0.2rem;
}

ul.linklist .years {
  float: right;
  color: var(--uofg-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  padding-left: 1rem;
}

@media screen and (max-width: 39.9375em) {
  ul.linklist .years { float: none; display: block; padding-left: 0; }
}

.note {
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  background: var(--uofg-tint);
  border-radius: var(--radius);
  font-size: 0.96rem;
}

/* =============================================================== METRICS */

ul.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
}

ul.metrics > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 8rem;
  padding: 0.65rem 1rem !important;
  background: var(--uofg-blue);
  color: #fff;
  border-radius: var(--radius);
  border: 0;
}

.metric-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

.metric-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-top: 0.2rem;
}

.metric-label a { color: #fff; text-decoration: underline; }

/* ================================================================= TILES */
/* The tiles carry no image, so T4's image-derived spacing does not apply and
   the text block sets its own. data-equalizer gives them equal heights. */

/* IMPORTANT: T4's .row is a FLEX container, not the classic Foundation float
   grid, so the large-6 / medium-6 classes do NOT size these - without an
   explicit basis the four tiles size to content and land 4-across in one line.
   Set the width here. */
.tileRow {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tileRow .tileContainer {
  flex: 0 0 50%;
  max-width: 50%;
  margin-bottom: 1rem;
}

@media screen and (max-width: 39.9375em) {
  .tileRow .tileContainer {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* T4 puts an arrow marker on links inside tiles via a::before, using the BLUE
   arrow asset - which is invisible on the dark tiles, and with our zeroed list
   padding it overlapped the first letter. Suppress it here; note this is on the
   anchor, not the li, which is why the bullet reset at the top misses it. */
.tileText ul li a::before,
.tileText ul li a::after {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

.tileText ul li a {
  padding-left: 0 !important;
}

.tileRow .tile {
  height: 100%;
}

.tileRow .tileText {
  padding: 1.15rem 1.35rem;
}

.tileRow .tileText h2 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
}

.tileRow .tileText p {
  margin-bottom: 0.6rem;
  line-height: 1.45;
}

.tileRow .tileText .plainlist > li {
  padding: 0.15rem 0;
}

/* ================================================= SECTION NAV CURRENT ITEM */

#onthispage li a[aria-current="true"] {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--uofg-rose);
}

/* ============================================================ HOUSEKEEPING */

.last-modified {
  margin-top: 1.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--uofg-line);
  font-size: 0.85rem;
  color: var(--uofg-muted);
}

.colclear { clear: both; }

/* keep the mobile off-canvas panel out of the way on larger screens even if
   central JS has not run yet */
@media screen and (min-width: 40em) {
  #leftNav { display: none; }
}

@media print {
  #az, #leftNav, #section-navigation, footer, #btt, .last-modified { display: none !important; }
  #main-content-wrapper { width: 100% !important; }
  ul.linklist > li { border-bottom: none; }
}
