/* main.css */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Slab:wght@400;500&display=swap');

/* Colours */
:root {
--background: #ffffff;
--text: #263340;
--heading: #18354a;
--link: #285f85;
--link-hover: #173d59;
--soft-background: #f1f5f8;
--border: #dce4ea;
--muted: #526575;
}

/* Basic reset */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
width: min(1000px, calc(100% - 32px));
margin: 48px auto;
background: var(--background);
color: var(--text);
font-family: 'Roboto', sans-serif;
font-size: 1rem;
line-height: 1.7;
}

img {
max-width: 100%;
}

/* Links */
a {
color: var(--link);
text-decoration: none;
text-underline-offset: 4px;
}

a:hover,
a:active {
color: var(--link-hover);
}

a:focus-visible {
outline: 2px solid var(--link);
outline-offset: 4px;
}

a.current {
color: var(--heading);
}

/* Headings */
h1,
h2,
h3,
h4 {
clear: left;
color: var(--heading);
font-family: 'Roboto', sans-serif;
font-weight: 500;
line-height: 1.3;
text-shadow: none;
}

h1 {
margin: 1.5em 0 0.7em;
font-size: 2.5rem;
}

h2 {
margin: 2.5rem 0 1rem;
font-size: 1.8rem;
}

h3 {
margin: 1.5rem 0 0.8rem;
font-size: 1.4rem;
}

h4 {
margin: 1rem 0 0.6rem;
font-size: 1.1rem;
}

[id] {
scroll-margin-top: 24px;
}

/* Paragraphs and lists */
p {
width: min(900px, 100%);
margin: 20px auto;
text-align: left;
}

li a,
p a {
text-decoration: none;
}

ul {
width: min(800px, 100%);
margin: 24px auto;
list-style: none;
}

ul li {
margin: 8px 0;
}

i,
em {
font-style: italic;
}

b,
strong {
font-weight: 700;
}

sup,
sub {
font-size: 0.8em;
line-height: 0;
}

sup {
vertical-align: super;
}

sub {
vertical-align: sub;
}

/* General tables */
table {
width: 100%;
margin: 12px auto 24px;
border-collapse: collapse;
}

th,
td {
text-align: left;
vertical-align: top;
}

/* Workshop banner */
.banner {
width: 100%;
}

/* Title above the photograph */
.top-left {
padding: 0 12px 30px;
text-align: center;
font-family: 'Roboto Slab', serif;
font-size: clamp(2rem, 4.8vw, 3.4rem);
font-weight: 400;
line-height: 1.2;
}

.title1,
.title2 {
color: var(--heading);
text-shadow: none;
}

/* Photograph */
.photo-banner {
position: relative;
width: 100%;
overflow: hidden;
border-radius: 6px;
}

.photo-banner > img {
display: block;
width: 100%;
height: clamp(350px, 55vw, 600px);
object-fit: cover;
object-position: 65% center;
}

/* Subtle shading behind the memorial text */
.photo-banner::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
to bottom,
rgba(10, 28, 40, 0.48),
transparent 60%
);
pointer-events: none;
}

.memorial-text {
position: absolute;
z-index: 1;
top: clamp(20px, 4vw, 45px);
left: clamp(20px, 4vw, 50px);
width: 60%;
color: #ffffff;
font-family: 'Roboto Slab', serif;
font-size: clamp(1.4rem, 3vw, 2.3rem);
font-weight: 400;
line-height: 1.3;
text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.workshop-date {
display: inline-block;
margin-top: 0.6em;
font-family: 'Roboto', sans-serif;
font-size: clamp(1rem, 1.8vw, 1.25rem);
line-height: 1.5;
}

/* Navigation */
table.navigation {
width: min(900px, 100%);
margin: 20px auto 40px;
border-bottom: 1px solid var(--border);
}

td.navigation {
width: 20%;
padding: 0;
text-align: center;
vertical-align: middle;
white-space: nowrap;
font-size: 1.05rem;
}

td.navigation a {
display: block;
padding: 14px 10px;
border-bottom: 2px solid transparent;
}

td.navigation a:hover {
background: var(--soft-background);
}

td.navigation a.current {
border-bottom-color: var(--link);
font-weight: 500;
}

/* Programme: headings retain their original alignment */
.programme {
width: 100%;
margin-top: 48px;
}

.programme > h2,
.programme-note {
text-align: left;
}

.programme-days {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: 28px;
width: 100%;
margin-top: 28px;
}

.programme-day {
flex: 1 1 0;
min-width: 0;
border: none;
background: transparent;
box-shadow: none;
}

.day-heading {
padding: 0 0 18px;
text-align: left;
}

.day-heading h3 {
margin: 0;
font-size: 1.4rem;
line-height: 1.4;
}

.day-heading p {
width: auto;
margin: 6px 0 0;
color: var(--muted);
}

.session {
width: 100%;
}

.session h4 {
margin: 16px 0 8px 50px;
color: var(--muted);
font-size: 1rem;
}

/* Indent only the entries, not the headings */
.programme-day .talk,
.programme-day .programme-break {
display: grid;
grid-template-columns: 110px minmax(0, 1fr);
gap: 12px;
align-items: baseline;
width: auto;
margin-left: 50px;
padding: 12px 0;
border-bottom: 1px solid var(--border);
font-size: 1rem;
line-height: 1.6;
}

.talk time,
.programme-break time {
white-space: nowrap;
font-variant-numeric: tabular-nums;
font-weight: 500;
}

.talk a,
.programme-break span {
min-width: 0;
overflow-wrap: anywhere;
}

.talk a:hover {
text-decoration: underline;
}

/* Quiet shading for breaks */
.programme-day .programme-break {
background: var(--soft-background);
}

.programme-break span {
color: var(--muted);
}

/* Abstracts page */
td.room {
padding: 8px 12px 8px 4px;
color: var(--heading);
font-size: 1.3rem;
}

td.date {
width: 110px;
padding: 8px 20px 0 0;
color: var(--muted);
text-align: right;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}

td.title,
td.title-special {
padding: 8px 12px 4px 4px;
color: var(--heading);
font-family: 'Roboto', sans-serif;
font-size: 1.3rem;
font-weight: 500;
line-height: 1.4;
text-shadow: none;
}

td.speaker {
padding: 4px 12px 8px 4px;
color: var(--muted);
font-style: italic;
}

td.abstract {
padding: 4px 12px 24px 4px;
line-height: 1.7;
overflow-wrap: anywhere;
}

td.abstract img {
display: block;
max-width: 100%;
height: auto;
margin: 12px auto;
}

table.plenary {
background: var(--soft-background);
}

/* Registration and directions */
iframe.registration,
iframe.directions {
display: block;
margin: 24px auto 32px;
border: none;
}

iframe.registration {
width: min(700px, 100%);
height: 1400px;
}

iframe.directions {
width: min(800px, 100%);
height: 400px;
}

img.center {
display: block;
width: 67%;
height: auto;
margin: 24px auto 32px;
}

/* Flyer */
table.flyers {
width: min(800px, 100%);
}

td.flyer {
width: 50%;
padding: 12px;
text-align: center;
vertical-align: middle;
}

td.flyer img {
max-width: 100%;
height: auto;
}

.workshop-flyer {
width: min(700px, 100%);
margin: 32px auto;
}

.workshop-flyer img {
display: block;
width: 100%;
height: auto;
}

.workshop-flyer figcaption {
margin-top: 16px;
text-align: center;
}

/* Sponsor logos */
.sponsor-logos {
width: min(900px, 100%);
margin: 60px auto 30px;
padding-top: 32px;
border-top: 1px solid var(--border);
display: grid;
grid-template-columns:
minmax(0, 1fr)
minmax(0, 1.5fr)
minmax(0, 1fr);
gap: 36px;
align-items: center;
}

.sponsor-logos a {
display: flex;
align-items: center;
justify-content: center;
height: 120px;
}

.sponsor-logos img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
}

/* Support for pages still using the sponsor table */
table.sponsors {
width: min(900px, 100%);
margin: 60px auto 30px;
}

td.sponsor {
width: 33.333%;
padding: 16px;
text-align: center;
vertical-align: middle;
}

td.sponsor img {
max-width: 100%;
height: auto;
}

/* Footer */
footer {
margin-top: 64px;
padding: 24px 0;
border-top: 1px solid var(--border);
color: var(--muted);
text-align: center;
font-size: 0.875rem;
}

/* Phones and narrow screens */
@media only screen and (max-width: 700px) {
body {
width: calc(100% - 24px);
margin: 24px auto;
}

.top-left {
padding: 0 0 24px;
font-size: clamp(1.8rem, 7vw, 2.8rem);
}

.title1,
.title2 {
display: block;
}

.photo-banner > img {
height: 430px;
object-position: 68% center;
}

.memorial-text {
top: 18px;
left: 18px;
width: calc(100% - 36px);
font-size: clamp(1.3rem, 4.5vw, 1.8rem);
}

.workshop-date {
font-size: 1rem;
}

/* Wrapping navigation with no horizontal scrolling */
table.navigation,
table.navigation tbody {
display: block;
width: 100%;
}

table.navigation tr {
display: flex;
flex-wrap: wrap;
justify-content: center;
}

td.navigation {
display: block;
width: auto;
font-size: 1rem;
}

td.navigation a {
padding: 12px;
}

h2 {
font-size: 1.6rem;
}

.programme-day .talk,
.programme-day .programme-break {
margin-left: 18px;
}

.session h4 {
margin-left: 18px;
}

.day-heading h3 {
font-size: 1.25rem;
}

td.date {
width: 70px;
padding-right: 10px;
font-size: 0.875rem;
}

td.title,
td.title-special {
font-size: 1.15rem;
}
}

/* Stack the two programme days */
@media only screen and (max-width: 650px) {
.programme-days {
flex-direction: column;
gap: 36px;
}

.programme-day {
width: 100%;
}
}

/* Stack sponsor logos */
@media only screen and (max-width: 600px) {
.sponsor-logos {
grid-template-columns: 1fr;
gap: 28px;
}

.sponsor-logos a {
width: min(260px, 100%);
height: 100px;
margin: 0 auto;
}

.sponsor-logos a:nth-child(2) {
width: min(340px, 100%);
}
}

.network-note {
    width: 100%;
    margin: 20px auto;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
    color: #526575;
}

/* Extra-small screens */
@media only screen and (max-width: 380px) {
.programme-day .talk,
.programme-day .programme-break {
grid-template-columns: 1fr;
gap: 3px;
}
}
