/* Responsive presentation for the archived City University site. */
:root {
  color-scheme: light;
  --city-blue: #005faf;
  --page-grey: #c3c6c8;
  --ink: #202020;
  --muted: #707070;
  --surface: #ffffff;
  --side-column-width: min(17rem, 70%);
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-grey);
  font-family: 'PT Sans', Arial, sans-serif;
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.1rem);
  line-height: 1.65;
}

a {
  color: var(--city-blue);
  overflow-wrap: anywhere;
  text-underline-offset: 0.16em;
}

a:hover, a:focus { color: #00477f; }

#page {
  width: min(1120px, calc(100% - 3rem));
  margin: clamp(1rem, 4vw, 3rem) auto;
  overflow: hidden;
  background: var(--surface);
  border: 0;
  border-radius: 0.85rem;
  box-shadow: 0 1.1rem 3.5rem rgb(23 40 53 / 18%);
}

#banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(7.5rem, 16vw, 9.5rem);
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--city-blue) url('../georgana.net/sotiris/hilf/aplo.jpg') no-repeat right center / auto 100%;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

#banner::before {
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: var(--side-column-width);
  background: var(--surface);
  content: '';
}

#banner > img {
  position: relative;
  z-index: 1;
  width: min(180px, 42vw) !important;
  height: auto;
  margin: 0;
}

#zone1 {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: auto;
  height: auto;
  float: none;
}

#wrapper {
  display: grid;
  grid-template-columns: var(--side-column-width) minmax(0, 1fr);
  align-items: stretch;
  margin: 0;
  background: var(--city-blue);
  color: var(--ink);
}

#nav {
  float: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 2rem 1.25rem;
  background: var(--city-blue);
  color: var(--surface);
}

#nav > p { display: none; }

#nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#nav ul + ul {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 35%);
  font-size: 0.9rem;
  line-height: 1.55;
}

#nav li + li { margin-top: 0.3rem; }

#nav a {
  display: block;
  padding: 0.36rem 0.5rem;
  color: var(--surface);
  border-radius: 0.3rem;
  font-weight: 700;
  text-decoration: none;
}

#nav a:hover, #nav a:focus {
  color: var(--surface);
  background: rgb(255 255 255 / 18%);
  text-decoration: none;
}

#nav a[aria-current='page'] {
  color: var(--city-blue);
  background: var(--surface);
  font-weight: 700;
}

.nav-toggle { display: none; }

.nav-section-heading {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#content, #contentfirst {
  min-width: 0;
  height: auto;
  min-height: 34rem;
  margin: 0;
  padding: clamp(1.75rem, 5vw, 4rem);
  background: var(--surface);
  color: var(--ink);
  font-size: inherit;
  text-align: left;
}

#content h1, #content h2, #content h3, #contentfirst h1, #contentfirst h2, #contentfirst h3 {
  margin: 2.1rem 0 0.75rem;
  color: var(--city-blue);
  line-height: 1.18;
}

#content h1:first-child, #content h2:first-child, #content h3:first-child { margin-top: 0; }
#content h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
#content h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); }
#content h3 { font-size: 1.25rem; }
#content p { margin: 0 0 1.2rem; }

#content .profpic {
  float: right;
  width: min(20rem, 44%);
  margin: 0 0 1.5rem 2rem;
  padding: 1rem;
  border: 1px solid #d9e1e6;
  border-radius: 0.6rem;
  background: #f7fafc;
  box-shadow: 0 0.45rem 1.3rem rgb(23 40 53 / 9%);
  font-family: Arial, 'DejaVu Sans', 'Liberation Sans', Freesans, sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

#content .profpic img {
  display: block;
  width: 100% !important;
  margin: 0 0 0.75rem;
  border-radius: 0.35rem;
}

#content iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  min-height: min(65vw, 31rem);
  margin: 1.25rem 0;
  border-radius: 0.5rem;
}

#content .apaper {
  margin: 0 0 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #d9e1e6;
}

#content .abslink, #content .info {
  display: inline-block;
  margin: 0.55rem 0 0;
  padding: 0.2rem 0.55rem;
  color: var(--city-blue);
  border: 1px solid #bfd3e5;
  border-radius: 999px;
  background: #eef5fa;
  font-size: 0.86rem;
  text-decoration: none;
}

#content .abslink:hover, #content .abslink:focus, #content .info:hover, #content .info:focus {
  color: var(--surface);
  border-color: var(--city-blue);
  background: var(--city-blue);
}

#content .journ { color: var(--ink); }
#content .update { color: var(--muted); }

img {
  max-width: 100%;
  height: auto;
  margin: 0.6rem;
}

#footer {
  clear: both;
  margin: 0;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 18%);
  background: var(--city-blue);
  color: var(--surface);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 760px) {
  #page {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #banner {
    min-height: 7.25rem;
    background-size: auto 100%;
  }

  #wrapper { grid-template-columns: 1fr; }

  .nav-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
    color: var(--surface);
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 0.4rem;
    background: rgb(0 71 127 / 32%);
    box-shadow: 0 0.2rem 0.5rem rgb(0 0 0 / 16%);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
  }

  .nav-toggle:hover, .nav-toggle:focus-visible {
    background: rgb(0 71 127 / 65%);
    outline: 2px solid var(--surface);
    outline-offset: 2px;
  }

  .nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
    display: block;
    width: 1.15rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: '';
  }

  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before, .nav-toggle-icon::after { position: absolute; left: 0; }
  .nav-toggle-icon::before { top: -0.36rem; }
  .nav-toggle-icon::after { top: 0.36rem; }

  #nav {
    padding: 0.9rem 1rem 1rem;
  }

  html.has-menu-toggle #nav { display: none; }
  html.has-menu-toggle #nav.is-open { display: block; }

  #nav ul:first-of-type {
    display: grid;
    gap: 0.3rem;
  }

  #nav li + li { margin-top: 0; }
  #nav a { padding: 0.55rem 0.65rem; }

  #nav ul + ul {
    margin-top: 1rem;
    padding-top: 1rem;
  }

  #content, #contentfirst {
    min-height: 0;
    padding: 1.75rem 1.25rem 2.5rem;
  }

  #content .profpic {
    float: none;
    width: 100%;
    max-width: 20rem;
    margin: 0 auto 1.5rem;
  }
}

@media (max-width: 420px) {
  #banner { background-image: none; }
  #banner > img { width: min(180px, 62vw) !important; }
  #content, #contentfirst { padding-inline: 1rem; }
}
