/* Colours and type follow flexmesh.co.uk */
:root {
  --blue: #1884ff;          /* buttons */
  --blue-heading: #1576e3;  /* section headings */
  --blue-link: #0077cc;     /* links, nav */
  --navy: #102a43;          /* titles */
  --text: #1a1a1a;
  --body: #333333;
  --muted: #5c6773;
  --page: #f4f8fb;
  --card: #e3f2fd;
  --card-hover: #d6ebfc;
  --white: #ffffff;
  --hero: linear-gradient(135deg, #e0f2ff 0%, #f4faff 100%);
  --shadow-btn: 0 5px 15px rgba(0, 119, 204, 0.2);
  --shadow-card: 0 2px 8px rgba(16, 42, 67, 0.06);
  --radius: 12px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}
/* Each section fills the window and the page snaps from one to the next.
   Strict snapping only where the sections fit; on phones and short windows
   it stays gentle so taller sections can still be scrolled through. */
@media (min-width: 48rem) and (min-height: 36rem) {
  html { scroll-snap-type: y mandatory; }
}
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
}
.screen > .wrap { width: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 1rem/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-link); }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid rgba(24, 132, 255, 0.45);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Hero */

.hero { background: var(--hero); }
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(3.5rem, 9vw, 6rem);
  padding-bottom: clamp(3.5rem, 9vw, 6rem);
  text-align: center;
}
.portrait {
  width: 11rem;
  height: 11rem;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: var(--radius);
  border: 5px solid var(--white);
  box-shadow: 0 10px 30px rgba(0, 119, 204, 0.18);
}
h1 {
  margin: 1.5rem 0 0;
  color: var(--navy);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.hero-role {
  margin: 0.75rem 0 0;
  color: var(--blue-heading);
  font-size: 1.125rem;
  font-weight: 600;
}
.hero-role a { color: inherit; text-underline-offset: 3px; }
.hero-lead {
  max-width: 36rem;
  margin: 1rem 0 0;
  color: var(--body);
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.btn svg { width: 1.05rem; height: 1.05rem; flex: none; }
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: #0f74e6; transform: translateY(-1px); }
.btn-secondary {
  background: var(--white);
  color: var(--blue-link);
  box-shadow: 0 2px 10px rgba(0, 119, 204, 0.12);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-btn); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 4vh, 2.25rem);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue-link);
  box-shadow: 0 4px 14px rgba(0, 119, 204, 0.15);
  transform: translateX(-50%);
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-cue:hover { background: var(--white); }
.scroll-cue svg { width: 1.25rem; height: 1.25rem; }
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* Sections */

.block { padding: clamp(3.5rem, 8vw, 5rem) 0; }

h2 {
  margin: 0 0 2rem;
  color: var(--blue-heading);
  font-size: clamp(1.75rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-align: center;
}

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 42rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* What I'm building: one block per venture, logo on a branded panel */

.venture {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dcebf8;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04), 0 14px 34px -18px rgba(16, 42, 67, 0.25);
  color: var(--body);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.venture:hover {
  transform: translateY(-4px);
  border-color: #b8d9f8;
  box-shadow: 0 1px 2px rgba(16, 42, 67, 0.04), 0 24px 48px -20px rgba(0, 119, 204, 0.38);
}

.venture-stage {
  display: grid;
  place-items: center;
  height: 11.5rem;
  padding: 2rem;
  overflow: hidden;
}
.venture-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 76%;
  max-height: 4.4rem;
  transition: transform 0.35s ease;
}
.venture:hover .venture-stage img { transform: scale(1.045); }
.stage-flexmesh {
  background:
    radial-gradient(circle at 1px 1px, rgba(21, 118, 227, 0.16) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(135deg, #dcefff 0%, #f4faff 100%);
}
.stage-dojo {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0) 0 0 / 18px 18px,
    radial-gradient(120% 140% at 100% 0%, #2b3037 0%, #15171a 62%);
}
.stage-flexmesh img { max-height: 5rem; max-width: 80%; }
.stage-dojo img { max-height: 5.6rem; max-width: 70%; }

.venture-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.75rem 1.4rem;
}
.kicker {
  color: var(--blue-link);
  font-size: 0.875rem;
  font-weight: 600;
}
.venture-text { display: block; margin: 0.4rem 0 1.1rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.tags span {
  padding: 0.2rem 0.7rem;
  border-radius: 30px;
  background: var(--card);
  color: var(--blue-link);
  font-size: 0.8125rem;
  font-weight: 600;
}

.venture-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid #e6eef5;
}
.venture-url { color: var(--navy); font-weight: 700; font-size: 0.9375rem; }
.venture-go {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--card);
  color: var(--blue-link);
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.venture-go svg { width: 1.05rem; height: 1.05rem; }
.venture:hover .venture-go { background: var(--blue); color: var(--white); transform: translateX(3px); }

/* Research & talks */

.gallery { display: grid; gap: 1.25rem; }
@media (min-width: 42rem) {
  /* shrink the photos on shorter windows so the section fits one screen */
  .gallery {
    grid-template-columns: 3fr 2fr;
    max-width: min(100%, calc((100vh - 19rem) * 2.5));
    max-width: min(100%, calc((100svh - 19rem) * 2.5));
    margin: 0 auto;
  }
}

.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--card);
}
.shot:not(.shot-wide) img { aspect-ratio: 6 / 5; object-position: 25% 50%; }
@media (min-width: 42rem) { .shot:not(.shot-wide) img { aspect-ratio: 1; } }
.shot figcaption {
  padding: 1.1rem 1.35rem 1.3rem;
  color: var(--body);
  font-size: 0.9375rem;
}
.shot figcaption strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--navy);
  font-weight: 700;
}
.credit {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Contact */

.contact { background: var(--hero); }
.contact-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(3.5rem, 8vw, 5rem);
  padding-bottom: clamp(3.5rem, 8vw, 5rem);
  text-align: center;
}
.contact h2 { margin-bottom: 0.75rem; }
.contact p { margin: 0; color: var(--body); font-size: 1.125rem; }

/* Footer */

.footer { background: var(--white); color: #666; font-size: 0.9rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* 404 */

.hero-full { min-height: 100vh; display: flex; align-items: center; }
.hero-full .hero-inner { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .card:hover, .btn:hover { transform: none; }
}
