/* ==========================================================================
   RESSLab virtual experiments — site styles
   Visual reference: https://www.epfl.ch/labs/resslab/ (EPFL 2018 theme)
   Arial, #212121 text, EPFL red #ff0000, light grey #e6e6e6, square corners.
   ========================================================================== */
:root {
  --red: #ff0000;
  --red-dark: #b51f1f;
  --ink: #212121;
  --ink-soft: #707070;
  --grey: #e6e6e6;
  --grey-light: #f5f5f5;
  --width: 1140px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: Arial, sans-serif; font-weight: 400; font-size: 1rem; line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--ink); text-decoration: underline; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.container { width: 90%; max-width: var(--width); margin: 0 auto; }

/* ---- top bar: EPFL logo + lab name ---- */
.site-header { border-bottom: 1px solid var(--grey); background: #fff; }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 0; }
.site-header .logo img { display: block; height: 40px; width: auto; }
.site-header .lab-logo, .site-header .lab-title { text-decoration: none; font-weight: 700; font-size: 1.125rem; line-height: 1.25; }
.site-header .lab-logo { border-left: 1px solid var(--grey); padding-left: 1.5rem; display: flex; align-items: center; }
.site-header .lab-logo img { height: 40px; width: auto; display: block; }
.site-header .lab-title { border-left: 1px solid var(--grey); padding-left: 1.5rem; display: flex; align-items: center; height: 40px; }

/* ---- breadcrumb ---- */
.crumbs { background: var(--grey-light); font-size: .875rem; }
.crumbs .container { padding: .6rem 0; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--red); }
.crumbs .sep { margin: 0 .4rem; }

/* ---- page title ---- */
main { flex: 1 0 auto; padding: 2.5rem 0 4rem; }
h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; margin: 0 0 1rem; }
h1::after { content: ""; display: block; width: 3rem; height: 3px; background: var(--red); margin-top: .75rem; }
.lead { color: var(--ink-soft); font-size: 1.125rem; max-width: 60ch; margin: 0 0 2.5rem; }

/* ---- experience grid ---- */
.grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.xcard { display: flex; flex-direction: column; border: 1px solid var(--grey); background: #fff; }
.xcard .thumb { aspect-ratio: 16/10; background: var(--grey); overflow: hidden; position: relative;
                display: grid; place-items: center; color: var(--ink-soft); font-size: .875rem; }
.xcard .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.xcard .body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.25rem 1.5rem; border-top: 1px solid var(--grey); }
.xcard .cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin: 0 0 .5rem; }
.xcard h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .5rem; }
.xcard p.desc { margin: 0 0 1.25rem; color: var(--ink-soft); font-size: .9375rem; }
.xcard .go { margin-top: auto; font-weight: 700; text-decoration: none; color: var(--red); }
.xcard .go.off { color: var(--ink-soft); font-weight: 400; }
a.xcard { text-decoration: none; color: inherit; transition: border-color .15s; }
a.xcard:hover { border-color: var(--red); }
a.xcard:hover .go { text-decoration: underline; }
.xcard.soon { opacity: .8; }

/* ---- experience page ---- */
.btn-back { display: inline-block; margin-bottom: 1.5rem; font-size: .9375rem; text-decoration: none; color: var(--red); }
.btn-back:hover { text-decoration: underline; }
.exp-head { margin-bottom: 1.5rem; }
.exp-head p { margin: 0; color: var(--ink-soft); font-size: 1.0625rem; max-width: 70ch; }
.tour { display: flex; flex-direction: column; gap: 16px; }

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #fff; font-size: .875rem; }
.site-footer .container { padding: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--red); }

@media (max-width: 767px) {
  h1 { font-size: 1.75rem; }
  .lead { font-size: 1rem; margin-bottom: 1.75rem; }
  main { padding: 1.5rem 0 3rem; }
  .site-header .logo img { height: 32px; }
  .site-header .container { gap: 1rem; }
  .site-header .container { flex-wrap: wrap; row-gap: .5rem; }
  .site-header .lab-logo, .site-header .lab-title { padding-left: 1rem; }
  .site-header .lab-logo img { height: 32px; }
  .site-header .lab-title { height: 32px; }
  .site-header .lab-logo, .site-header .lab-title { font-size: 1rem; }
  .grid { gap: 1.25rem; }
}
