﻿/* ------------------------------------------------------------------
   Style for parminderlally site. You should not normally need to edit
   this file: all content lives in index.html.
   To change the colour scheme, edit the values in :root below.
   The previous (teal) design is kept in the archive folder.
   ------------------------------------------------------------------ */

:root {
  --bg: #f6f5f7;            /* soft grey page */
  --surface: #ffffff;       /* cards */
  --sunk: #ece9ef;
  --ink: #2a2233;           /* plum-grey text */
  --muted: #655b70;
  --rule: #e2dee6;
  --berry: #b0245e;         /* raspberry: links, buttons */
  --berry-deep: #8c1a4a;
  --berry-soft: #f5e4ec;
  --gold: #c9a24a;          /* muted gold: lines only, never text */
  --max: 64rem;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1620;
    --surface: #241d2a;
    --sunk: #16121a;
    --ink: #efeaf2;
    --muted: #b4a9bc;
    --rule: #382f40;
    --berry: #ee6f9f;
    --berry-deep: #f592b8;
    --berry-soft: #3a2030;
    --gold: #d6b460;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1620;
  --surface: #241d2a;
  --sunk: #16121a;
  --ink: #efeaf2;
  --muted: #b4a9bc;
  --rule: #382f40;
  --berry: #ee6f9f;
  --berry-deep: #f592b8;
  --berry-soft: #3a2030;
  --gold: #d6b460;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--berry);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--berry) 45%, transparent);
}
a:hover { color: var(--berry-deep); text-decoration-color: currentColor; }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px;
}

h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.15;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.entry > *, .two-col > *, .motif > * { min-width: 0; }
h1, h2, h3, a { overflow-wrap: break-word; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 3.5rem;
}
.nav .brand {
  font-family: "Newsreader", Georgia, serif; font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav ul {
  list-style: none; margin: 0; padding: 0; min-width: 0;
  display: flex; gap: 1.2rem; overflow-x: auto; scrollbar-width: none;
}
.nav ul::-webkit-scrollbar { display: none; }
.nav ul a {
  color: var(--muted); text-decoration: none; font-size: 0.93rem; white-space: nowrap;
}
.nav ul a:hover { color: var(--berry); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 0 4.5rem; border-bottom: 1px solid var(--rule);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem; align-items: center;
}
.hero-text { max-width: var(--measure); }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  letter-spacing: -0.015em; line-height: 1.05;
  margin: 0 0 0.9rem;
}
.hero .post { color: var(--muted); margin: 0 0 1.1rem; font-size: 1.02rem; }
.hero .lede { font-size: 1.25rem; line-height: 1.5; margin: 0 0 1.6rem; }

.buttons { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.button {
  display: inline-block; padding: 0.6rem 1.15rem; border-radius: 4px;
  border: 1px solid var(--berry); color: var(--berry);
  text-decoration: none; font-size: 0.95rem; font-weight: 500;
}
.button:hover { background: var(--berry-soft); color: var(--berry-deep); }
.button.primary { background: var(--berry); color: var(--bg); }
.button.primary:hover { background: var(--berry-deep); border-color: var(--berry-deep); color: var(--bg); }


.portrait {
  width: 15rem; height: 15rem; border-radius: 50%;
  object-fit: cover; display: block;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold);
}

/* Background drawing (images/motif.svg): a DNA helix unwinding into a
   neural network. --motif sets how faint it is; raise it to make the
   drawing stronger. Its colours are inside the SVG file itself, copied
   from --berry and --bg here by tools/make_motif.py. */
.hero-bg {
  --motif: 0.2;
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0; pointer-events: none; opacity: var(--motif);
}

/* The drawing sweeps in from the left once, on page load. Skipped if the
   visitor has asked their device to reduce motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero-bg { animation: sweep 2.6s cubic-bezier(.3, .1, .2, 1) 0.15s backwards; }
}
@keyframes sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Sections ---------- */
section { padding: 4rem 0; border-bottom: 1px solid var(--rule); }
section h2 { font-size: 2.1rem; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
section .intro { color: var(--muted); margin: 0 0 2rem; max-width: var(--measure); }
.prose p { max-width: var(--measure); }

h3.year {
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 1rem; font-weight: 600; color: var(--berry);
  margin: 2.4rem 0 0.6rem;
}

/* A dated list entry: date on the left, details on the right */
.entries { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.2rem;
  padding: 0.95rem 0; border-top: 1px solid var(--rule);
}
.entry:first-child { border-top: none; }
.entry .when { color: var(--muted); font-size: 0.9rem; padding-top: 0.15rem; }
.entry .what { font-weight: 600; }
.entry .where { color: var(--muted); font-size: 0.95rem; }
.entry p { margin: 0.2rem 0 0; max-width: var(--measure); }
.entry .tag {
  display: inline-block; font-size: 0.75rem; font-weight: 500;
  padding: 0.05rem 0.5rem; margin-left: 0.45rem; border-radius: 3px;
  background: var(--berry-soft); color: var(--berry); vertical-align: 0.1em;
}

/* "Opportunities to collaborate" cards: the only boxed elements on the page */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.2rem;
}
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-top: 3px solid var(--gold); border-radius: 4px;
  padding: 1.3rem 1.4rem 1.2rem;
  display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card p.more { margin-top: auto; padding-top: 0.9rem; }

/* Talk topics: a plain grid, quieter than the cards */
.topics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.6rem 2.2rem;
}
.topic { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.topic h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.topic p { margin: 0; color: var(--muted); font-size: 0.95rem; }

p.more { margin: 1rem 0 0; font-size: 0.95rem; font-weight: 500; }

/* The line under the "Opportunities to collaborate" cards pointing to Appleyard Lees */
.advice {
  margin: 1.4rem 0 0; padding: 0.85rem 1.1rem; max-width: var(--measure);
  background: var(--berry-soft); border-left: 3px solid var(--berry);
  border-radius: 0 4px 4px 0; font-size: 0.95rem;
}

/* Fold-away lists (click to open) */
details { margin-top: 0.6rem; }
summary {
  cursor: pointer; color: var(--berry); font-weight: 500;
  padding: 0.5rem 0; font-size: 0.95rem;
}
summary:hover { color: var(--berry-deep); }
details[open] > summary { margin-bottom: 0.3rem; }

blockquote {
  margin: 2rem 0; padding: 0.2rem 0 0.2rem 1.3rem;
  border-left: 2px solid var(--gold);
  font-family: "Newsreader", Georgia, serif; font-style: italic;
  font-size: 1.35rem; line-height: 1.4; max-width: var(--measure);
}
blockquote cite {
  display: block; margin-top: 0.5rem;
  font-family: "Instrument Sans", sans-serif; font-style: normal;
  font-size: 0.85rem; color: var(--muted);
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.two-col h3 { font-size: 1.3rem; margin: 0 0 0.6rem; }

footer { background: var(--sunk); padding: 2.5rem 0 3rem; color: var(--muted); font-size: 0.9rem; }
footer p { max-width: 48rem; }

/* ---------- Phones ---------- */
@media (max-width: 44rem) {
  .hero { padding-top: 2.75rem; }
  .hero .lede { font-size: 1.15rem; }
  .hero { padding-bottom: 3rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 1.75rem; }
  /* show the helix part of the drawing, behind the name, on narrow screens */
  .hero-bg { width: 340%; }
  .portrait { order: -1; width: 8rem; height: 8rem; }
  .entry { grid-template-columns: 1fr; gap: 0.1rem; }
  .two-col { grid-template-columns: 1fr; }
  .nav .brand { display: none; }
}
