/* ================================================================
   NONHOLONOMIC SYSTEMS — shared styles
   Used by the CAS project page (nonholonomic/index.html) and the workshop
   pages (_layouts/nonholonomic-workshop.html). Colours: :root block.
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Colours: CAS palette ---- */
:root {
  --green-dark: #32413e;   /* CAS dark green — nav, footer      */
  --green:      #375c4c;   /* CAS green — headings, buttons     */
  --green-soft: #a5cebb;   /* CAS light green — accents         */
  --red:        #af3e4e;   /* CAS burgundy — highlights         */
  --sand:       #e5c494;   /* CAS sand — hero accents           */
  --paper:      #f8f7f3;   /* page background                   */
  --card:       #ffffff;
  --text:       #22292a;
  --muted:      #5d6463;
  --border:     #dfe2dd;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans:  'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); font-weight: 400; color: var(--text); background: var(--paper); font-size: 17px; line-height: 1.7; }
a { color: var(--green); }
a:hover { color: var(--red); }

/* ---- Navigation ---- */
nav { background: var(--green-dark); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 60px; }
.nav-brand { display: flex; align-items: center; gap: 0.875rem; text-decoration: none; color: #fff; min-width: 0; }
.nav-brand img { height: 30px; width: auto; flex-shrink: 0; }
.nav-brand span { font-family: var(--serif); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid rgba(255,255,255,0.25); padding-left: 0.875rem; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; flex-shrink: 0; }
.nav-links a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover { color: var(--sand); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 6rem 1.5rem 5rem;
        background: url('/assets/images/nonholonomic-hero.svg') center / cover no-repeat,
                    radial-gradient(ellipse at center, var(--green) 0%, var(--green-dark) 75%); }
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; }
.hero-label { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); margin-bottom: 1.5rem; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--sand); }
.hero-subtitle { font-family: var(--serif); font-style: italic; font-size: 1.125rem; color: rgba(255,255,255,0.75); max-width: 600px; margin: 0 auto 2.5rem; }
.hero-cas { display: inline-flex; align-items: center; gap: 1rem; background: rgba(0,0,0,0.18); border: 1px solid rgba(255,255,255,0.18); border-radius: 4px; padding: 0.75rem 1.25rem; text-decoration: none; color: rgba(255,255,255,0.85); font-size: 0.875rem; text-align: left; transition: background 0.2s; }
.hero-cas:hover { background: rgba(0,0,0,0.3); color: #fff; }
.hero-cas img { height: 34px; width: auto; }

/* ---- Key facts strip ---- */
.facts { background: var(--card); border-bottom: 1px solid var(--border); }
.facts-inner { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 1.5rem; border-left: 1px solid var(--border); }
.fact:first-child { border-left: none; }
.fact-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.fact-value { font-family: var(--serif); font-size: 1.125rem; color: var(--green-dark); line-height: 1.4; }

/* ---- Sections ---- */
main { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4.5rem 0; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }
.section-label { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-bottom: 0.75rem; }
.section-label::before { content: ''; width: 28px; height: 2px; background: var(--red); }
section h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.625rem, 3.5vw, 2.25rem); color: var(--green-dark); line-height: 1.25; margin-bottom: 1.75rem; }
section p { color: var(--muted); max-width: 720px; }
section p + p { margin-top: 1rem; }
.lead { font-family: var(--serif); font-size: 1.1875rem; color: var(--text); line-height: 1.75; }

/* Research themes */
.themes { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 2rem; list-style: none; }
.themes li { background: #eef4f0; color: var(--green); border: 1px solid #d3e4da; border-radius: 999px; padding: 0.3rem 0.95rem; font-size: 0.875rem; font-weight: 600; }

/* People — centred cards with a round portrait on top */
.people { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.person { width: 340px; max-width: 100%; background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--green); border-radius: 8px; padding: 2.25rem 2rem 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 14px 36px rgba(50,65,62,0.08); transition: transform 0.25s, box-shadow 0.25s; }
.person:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(50,65,62,0.13); }
.avatar { width: 160px; height: 160px; border-radius: 50%; background: var(--green-dark); color: var(--sand); font-family: var(--serif); font-size: 2.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-bottom: 1.25rem; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--sand); }
.avatar { overflow: hidden; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.person-name { font-family: var(--serif); font-size: 1.5rem; color: var(--green-dark); line-height: 1.3; margin-bottom: 0.25rem; }
.person-name a { color: inherit; text-decoration: none; }
.person-name a:hover { color: var(--red); }
.person-meta { font-size: 1rem; color: var(--muted); line-height: 1.5; }
.person-role { display: inline-block; margin-top: 0.875rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); background: #f8ecee; padding: 0.2rem 0.6rem; border-radius: 3px; }
.person-email { display: block; margin-top: 0.625rem; font-size: 0.9375rem; text-decoration: none; }

/* Events timeline */
.timeline { list-style: none; border-left: 2px solid var(--green-soft); margin-left: 0.5rem; }
.event { position: relative; padding: 0 0 2rem 2rem; }
.event:last-child { padding-bottom: 0; }
.event::before { content: ''; position: absolute; left: -9px; top: 0.4rem; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--green); }
.event-date { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); }
.event-type { display: inline-block; margin-left: 0.5rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); border: 1px solid var(--green-soft); padding: 0 0.45rem; border-radius: 3px; vertical-align: 1px; }
.event h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--green-dark); line-height: 1.35; margin: 0.25rem 0; }
.event h3 a { color: inherit; text-decoration: none; }
.event h3 a:hover { color: var(--red); }
.event-meta { font-size: 0.9375rem; color: var(--muted); }
.event p { margin-top: 0.375rem; }
.events-placeholder { border: 1.5px dashed var(--green-soft); border-radius: 6px; padding: 3rem 2rem; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; background: rgba(165,206,187,0.08); }
.events-placeholder i { display: block; font-size: 1.75rem; color: var(--green-soft); margin-bottom: 0.75rem; }

/* Contact */
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; background: var(--green-dark); color: #fff; border-radius: 6px; padding: 2rem 2.25rem; }
.contact-card p { color: rgba(255,255,255,0.8); margin: 0; }
.contact-card strong { color: #fff; font-weight: 600; }
.button { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--sand); color: var(--green-dark); font-weight: 600; text-decoration: none; padding: 0.75rem 1.5rem; border-radius: 4px; transition: background 0.2s, color 0.2s; }
.button:hover { background: #fff; color: var(--red); }

/* ---- Footer ---- */
footer { background: var(--green-dark); color: rgba(255,255,255,0.6); font-size: 0.875rem; margin-top: 2rem; }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 2.5rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-inner img { height: 46px; width: auto; }
footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
footer a:hover { color: var(--sand); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---- Small screens ---- */
@media (max-width: 760px) {
  .nav-brand span { display: none; }
  .nav-links { gap: 1rem; }
  .facts-inner { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: none; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.6875rem; letter-spacing: 0.04em; }
  .hero { padding: 4rem 1rem 3.5rem; }
  .fact { padding: 1rem; }
  .person { padding: 2rem 1.25rem 1.5rem; }
  .avatar { width: 136px; height: 136px; }
}

/* ================================================================
   EVENT LINK BUTTON (project page timeline)
   ================================================================ */
.event-button { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; background: var(--green); color: #fff; font-size: 0.875rem; font-weight: 600; text-decoration: none; padding: 0.5rem 1.1rem; border-radius: 4px; transition: background 0.2s, color 0.2s; }
.event-button:hover { background: var(--sand); color: var(--green-dark); }

/* ================================================================
   WORKSHOP PAGES  (_layouts/nonholonomic-workshop.html)
   ================================================================ */

/* Notice shown while the information is preliminary */
.draft-notice { background: #fbf3e4; border-bottom: 1px solid #ecd9b4; color: #6b5124; font-size: 0.9375rem; text-align: center; padding: 0.75rem 1.5rem; }
.draft-notice i { color: #b8862e; margin-right: 0.4rem; }

/* Hero: smaller than the project hero, with date/venue chips */
.hero-workshop { padding: 4.5rem 1.5rem 4rem; }
.hero-back { display: inline-flex; align-items: center; gap: 0.4rem; color: rgba(255,255,255,0.7); font-size: 0.875rem; text-decoration: none; margin-bottom: 1.5rem; }
.hero-back:hover { color: var(--sand); }
.hero-workshop h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; list-style: none; }
.hero-chips li { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 0.4rem 1rem; font-size: 0.9375rem; color: rgba(255,255,255,0.9); }
.hero-chips i { color: var(--sand); }

/* Organizers: same cards as the PIs, a bit more compact */
.people-compact .person { width: 280px; padding: 1.75rem 1.5rem 1.5rem; }
.people-compact .avatar { width: 112px; height: 112px; font-size: 2rem; }
.people-compact .person-name { font-size: 1.25rem; }

/* Programme */
.programme { display: grid; gap: 1.5rem; }
.day { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.day-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; background: var(--green-dark); color: #fff; padding: 0.9rem 1.5rem; }
.day-name { font-family: var(--serif); font-size: 1.25rem; }
.day-date { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.slot { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.8rem 1.5rem; border-top: 1px solid var(--border); align-items: baseline; }
.slot:first-of-type { border-top: none; }
.slot-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--green); font-size: 0.9375rem; }
.slot-title { color: var(--text); }
.slot-speaker { display: block; font-size: 0.875rem; color: var(--muted); }
.slot-tba { color: var(--muted); font-style: italic; }
.slot.is-break { background: #f6f7f4; }
.slot.is-break .slot-title { color: var(--muted); }
.slot.is-break .slot-time { color: var(--muted); font-weight: 400; }
.slot.is-social { background: #fbf6ec; }
.slot.is-social .slot-time { color: #9a7330; }
.slot.is-special { background: #f8ecee; }
.slot.is-special .slot-time,
.slot.is-special .slot-title { color: var(--red); font-weight: 600; }
.slot-icon { color: var(--green-soft); margin-right: 0.35rem; }
.programme-note { margin-top: 1.25rem; font-size: 0.9375rem; }

/* Participants */
.participants { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.75rem; }
.participants li { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--green-soft); border-radius: 4px; padding: 0.7rem 1rem; }
.participant-name { font-weight: 600; color: var(--green-dark); }
.participant-affiliation { display: block; font-size: 0.8125rem; color: var(--muted); }
.participants-note { margin-top: 1.25rem; font-size: 0.9375rem; }

/* Venue */
.venue { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.venue-address { font-family: var(--serif); font-size: 1.125rem; color: var(--green-dark); line-height: 1.6; margin-bottom: 1.25rem; }
.venue h3 { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); margin: 1.25rem 0 0.4rem; }
.venue-map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 8px; background: #eef1ee; }
.venue-map-link { display: inline-block; margin-top: 0.5rem; font-size: 0.875rem; }

/* Practical information cards */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.info-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; }
.info-card i { font-size: 1.375rem; color: var(--green); margin-bottom: 0.75rem; }
.info-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; color: var(--green-dark); margin-bottom: 0.4rem; }
.info-card p { font-size: 0.9375rem; }

@media (max-width: 760px) {
  .venue { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .slot { grid-template-columns: 1fr; gap: 0.15rem; padding: 0.75rem 1rem; }
  .day-header { padding: 0.8rem 1rem; }
}
