/* jenneration — one stylesheet for the whole site */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1f21;
  --muted: #5f6368;
  --line: #e4e1da;
  --accent: #2f6f5e;
  --accent-soft: #e3efe9;
  --max: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141615;
    --surface: #1c1f1e;
    --text: #e8e6e1;
    --muted: #a3a8a4;
    --line: #2d3230;
    --accent: #7cc4ad;
    --accent-soft: #1f302a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--text); }

main.wrap { padding-top: 3rem; padding-bottom: 4rem; }
h1 { font-size: 2.25rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 3rem 0 1rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 0 0 0.25rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }

/* Project cards */
.cards { display: grid; gap: 1rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.card p { margin: 0.35rem 0 0.6rem; }
.card .links { display: flex; gap: 1rem; font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.5rem 0 0; list-style: none; }
.tags li {
  font-size: 0.8rem; background: var(--accent-soft); color: var(--accent);
  padding: 0.1rem 0.55rem; border-radius: 999px;
}
/* Home page cards: a hint of each project's own look */
.card-velosco { border-left: 4px solid #2f5673; background: linear-gradient(180deg, #eef3f7, var(--surface)); }
.card-velosco h3 { font-weight: 400; font-size: 1.2rem; color: #2f5673; }
.card-yumma { border: 2px solid #3a1d10; box-shadow: 4px 4px 0 #e2462b; }
.card-yumma h3 { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; font-weight: 900; font-size: 1.25rem; color: #e2462b; }
.card-circuits {
  background-image:
    linear-gradient(rgba(47,86,160,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,86,160,0.07) 1px, transparent 1px);
  background-size: 18px 18px;
  border-color: #b8c6e6;
}
.card-circuits h3 { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: #0f1d3a; }
.card-coursensu { background: #f3faef; border-color: #cfe6c2; }
.card-coursensu h3 { color: #3f9a3a; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
@media (prefers-color-scheme: dark) {
  .card-velosco { border-left-color: #6fa6c9; background: linear-gradient(180deg, #1d3448, var(--surface)); }
  .card-velosco h3 { color: #9fd3f0; }
  .card-yumma { border-color: #e2462b; box-shadow: 4px 4px 0 #ffc93c; }
  .card-yumma h3 { color: #ff7a5c; }
  .card-circuits { background-color: #0f1d3a; border-color: #2c4a8a;
    background-image: linear-gradient(rgba(120,160,255,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,255,0.12) 1px, transparent 1px); }
  .card-circuits h3 { color: #ffe14d; }
  .card-coursensu { background: #1b2a1d; border-color: #2f4a2c; }
  .card-coursensu h3 { color: #8fd66a; }
}
/* Whole card links to its block; "kind" says which page it lives on */
.card { position: relative; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.card h3 a:focus { outline: none; }
.card .kind { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.card-pebblepad { background: linear-gradient(113deg, #f1eef8, #e6f2fb); border-color: #d6d9ef; border-left: 4px solid #4b3a8a; }
.card-pebblepad h3 { color: #4b3a8a; font-weight: 600; }
.card-futurelearn { border-left: 4px solid #de00a5; }
.card-futurelearn h3 { color: #de00a5; font-weight: 800; }
.card-ucl { border-left: 6px solid #9a3bff; border-radius: 0; }
.card-ucl h3 { color: #361a54; font-weight: 700; }
.card-wild { border: 2px solid #1a1030; box-shadow: -3px 3px 0 #a77bff, 3px 6px 0 #4fc3ff; }
.card-wild h3 { color: #a0137a; font-weight: 900; }
@media (prefers-color-scheme: dark) {
  .card-pebblepad { background: linear-gradient(113deg, #2a2447, #1a3550); border-color: #3a3f66; border-left-color: #8e7bd6; }
  .card-pebblepad h3 { color: #b9aef0; }
  .card-futurelearn h3 { color: #ff5cc8; }
  .card-ucl h3 { color: #ba82ff; }
  .card-wild { border-color: #a77bff; }
  .card-wild h3 { color: #ff6ec7; }
}
.card h3 .status { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.status { font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-left: 0.4rem; }


/* Highlights */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem; padding: 0; margin: 2rem 0 0; list-style: none;
}
.stats li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem;
}
.stats strong { font-size: 1.9rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.stats span { font-size: 0.88rem; color: var(--muted); line-height: 1.35; }

.feature { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 1.1rem; margin-bottom: 1.75rem; }
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature p:last-child { margin-bottom: 0; }
.feature-meta { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.2rem; }
.tags-lg li { font-size: 0.9rem; padding: 0.25rem 0.75rem; }

.skills { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1rem; margin: 0; }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; }
@media (max-width: 34rem) {
  .skills { grid-template-columns: 1fr; gap: 0.2rem; }
  .skills dd { margin-bottom: 0.6rem; }
  h1 { font-size: 1.9rem; }
}

/* Project showcase: each project gets its own look */
.showcase { display: grid; gap: 1.5rem; margin: 2rem 0 1rem; }
.proj[id] { scroll-margin-top: 1.5rem; }
.proj { border-radius: 16px; padding: 1.75rem 1.5rem; overflow: hidden; position: relative; }
.proj h2 { margin: 0 0 0.25rem; font-size: 1.9rem; letter-spacing: -0.02em; }
.proj p { margin: 0 0 0.9rem; }
.proj-when { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-bottom: 0.4rem !important; }
.proj-tagline { font-size: 1.15rem; font-weight: 600; }
.proj-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0 0 1rem; list-style: none; font-size: 0.9rem; }
.proj-facts li { padding: 0.3rem 0.75rem; border-radius: 999px; }
.proj-link { margin: 0 !important; font-weight: 600; }
.proj a { color: inherit; }

/* Velosco Energy: offshore blue-grey, calm and technical */
.proj-velosco {
  background: linear-gradient(180deg, #1d3448 0%, #2f5673 60%, #4c7a96 100%);
  color: #e8f0f6;
}
.proj-velosco > *:not(svg) { position: relative; max-width: 34rem; }
.proj-velosco h2 { font-weight: 300; font-size: 2.2rem; letter-spacing: 0.01em; }
.proj-velosco .proj-tagline { color: #9fd3f0; font-weight: 500; }
.proj-velosco .proj-facts li { border: 1px solid rgba(232,240,246,0.4); }
.proj-velosco-turbine {
  position: absolute; right: -0.5rem; bottom: -1rem; width: 9rem; height: auto;
  stroke: rgba(232,240,246,0.28); stroke-width: 3; stroke-linecap: round; fill: rgba(232,240,246,0.28);
}
.proj-velosco-turbine .blades { transform-origin: 60px 60px; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .proj-velosco-turbine .blades { animation: none; } }

/* Yumma: warm tomato and mustard, chunky and friendly */
.proj-yumma {
  background: #fff4e0; color: #3a1d10;
  border: 3px solid #3a1d10; box-shadow: 6px 6px 0 #e2462b;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}
.proj-yumma h2 { color: #e2462b; font-size: 2.4rem; font-weight: 900; }
.proj-yumma .proj-facts li { background: #ffc93c; border: 2px solid #3a1d10; }
.proj-yumma .proj-link a { background: #e2462b; color: #fff; text-decoration: none; padding: 0.45rem 1rem; border-radius: 999px; display: inline-block; }

/* Learning Circuits: blueprint grid with electric yellow */
.proj-circuits {
  background-color: #0f1d3a; color: #dfe8ff;
  background-image:
    linear-gradient(rgba(120,160,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1px solid #2c4a8a;
}
.proj-circuits h2 { color: #ffe14d; font-family: ui-monospace, "SF Mono", Menlo, monospace; text-shadow: 0 0 18px rgba(255,225,77,0.45); }
.proj-circuits .proj-tagline { color: #7fe3ff; }
.proj-circuits .proj-facts li { border: 1px dashed #ffe14d; color: #ffe14d; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.proj-circuits .proj-link a { color: #ffe14d; }
.circuit-path-label { font-size: 0.9rem; color: #7fe3ff; margin-bottom: 0.4rem !important; }
.circuit-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.3rem;
  list-style: none; padding: 0; margin: 0 0 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85rem;
}
.circuit-path li { padding: 0.2rem 0.6rem; border-radius: 4px; background: rgba(127,227,255,0.12); color: #bfefff; }
.circuit-path li:last-child { background: #ffe14d; color: #0f1d3a; font-weight: 700; }
.circuit-path li { position: relative; }
.circuit-path li + li { margin-left: 1.1rem; }
.circuit-path li + li::before { content: "→"; color: #ffe14d; position: absolute; left: -1.05rem; font-weight: 400; }

/* Coursensu: fresh green storyboard with sticky notes */
.proj-coursensu {
  background: #eef8e8; color: #1f2a24;
  border: 1px solid #cfe6c2;
}
.proj-coursensu h2 { color: #3f9a3a; font-weight: 800; font-size: 2.3rem; letter-spacing: -0.03em; }
.proj-coursensu h2::after {
  content: ""; display: block; width: 7.5rem; height: 5px; margin-top: 0.1rem;
  background: #7fcf5a; border-radius: 999px; transform: rotate(-2deg);
}
.proj-coursensu .proj-facts li {
  border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,0.12); color: #1f2a24;
}
.proj-coursensu .proj-facts li:nth-child(1) { background: #b9dcf5; transform: rotate(-1.5deg); }
.proj-coursensu .proj-facts li:nth-child(2) { background: #fbe38a; transform: rotate(1deg); }
.proj-coursensu .proj-facts li:nth-child(3) { background: #f7c4c4; transform: rotate(-0.5deg); }
.proj-coursensu .proj-link a { background: #7fcf5a; color: #1f2a24; text-decoration: none; padding: 0.45rem 1rem; border-radius: 999px; display: inline-block; }

/* PebblePad: purple-to-blue gradient, four-petal mark, floating white app cards */
.proj-pebblepad {
  background: linear-gradient(113deg, #4b3a8a 0%, #2d5aa8 55%, #007fc8 100%);
  color: #fff; border-radius: 24px;
}
.proj-pebblepad > *:not(.pp-mark) { position: relative; max-width: 34rem; }
.proj-pebblepad .proj-when { letter-spacing: 0.1em; opacity: 0.9; font-weight: 600; }
.proj-pebblepad h2 { font-weight: 500; font-size: 2.3rem; letter-spacing: -0.02em; }
.proj-pebblepad .proj-tagline { color: #cfe6f7; font-weight: 600; }
.proj-pebblepad .proj-facts { gap: 0.75rem; }
.proj-pebblepad .proj-facts li {
  display: flex; align-items: center; gap: 0.5rem;
  background: #fff; color: #50535a; border-radius: 10px;
  padding: 0.45rem 0.8rem 0.45rem 0.5rem;
  box-shadow: 0 6px 18px rgba(20, 20, 60, 0.25);
}
.proj-pebblepad .proj-facts strong { color: #1f2124; }
.pp-icon {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem;
  border-radius: 5px; color: #fff; font-size: 0.7rem; font-weight: 700;
}
.proj-pebblepad .proj-facts li:nth-child(1) .pp-icon { background: #4f9a93; }
.proj-pebblepad .proj-facts li:nth-child(2) .pp-icon { background: #4b3a8a; }
.proj-pebblepad .proj-facts li:nth-child(3) .pp-icon { background: #c0392b; }
.proj-pebblepad .proj-link a { background: #fff; color: #007fc8; text-decoration: none; padding: 0.45rem 1.1rem; border-radius: 50px; display: inline-block; }
/* The four-petal mark: each petal rounded except the corner facing the centre */
.pp-mark { position: absolute; right: 1.5rem; top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 5.5rem; opacity: 0.95; }
.pp-mark span { aspect-ratio: 1; }
.pp-mark span:nth-child(1) { background: #8fa33b; border-radius: 50% 50% 0 50%; }
.pp-mark span:nth-child(2) { background: #6a4c9c; border-radius: 50% 50% 50% 0; }
.pp-mark span:nth-child(3) { background: #3a86c8; border-radius: 50% 0 50% 50%; }
.pp-mark span:nth-child(4) { background: #e3a82b; border-radius: 0 50% 50% 50%; }
@media (max-width: 34rem) { .pp-mark { width: 3.2rem; right: 1.25rem; top: auto; bottom: 1.25rem; gap: 3px; } }

/* FutureLearn: bold pink, big confident circles */
.proj-futurelearn { background: #de00a5; color: #fff; }
.proj-futurelearn > *:not(.fl-dots) { position: relative; max-width: 34rem; }
.proj-futurelearn h2 { font-weight: 800; font-size: 2.4rem; letter-spacing: -0.03em; }
.proj-futurelearn .proj-tagline { color: #ffe0f5; }
.proj-futurelearn .proj-facts li { background: #fff; color: #1a1a2e; }
.proj-futurelearn .proj-facts li strong { color: #de00a5; }
.proj-futurelearn .proj-link a { background: #1a1a2e; color: #fff; text-decoration: none; padding: 0.45rem 1rem; border-radius: 999px; display: inline-block; }
.fl-dots span { position: absolute; border-radius: 50%; }
.fl-dots span:nth-child(1) { width: 11rem; height: 11rem; background: rgba(255,255,255,0.14); right: -3rem; top: -3rem; }
.fl-dots span:nth-child(2) { width: 5rem; height: 5rem; background: #1a1a2e; opacity: 0.35; right: 3rem; bottom: -1.5rem; }
.fl-dots span:nth-child(3) { width: 2rem; height: 2rem; border: 4px solid rgba(255,255,255,0.5); right: 1.5rem; top: 45%; }

/* UCL: deep purple panel with a bright violet stripe, lilac headings, portico mark */
.proj-ucl {
  background: #361a54; color: #fff;
  border-left: 1.75rem solid #9a3bff; border-radius: 0;
}
.proj-ucl > *:not(svg) { position: relative; max-width: 34rem; }
.proj-ucl h2 { color: #ba82ff; font-weight: 600; font-size: 2.1rem; line-height: 1.15; letter-spacing: -0.01em; }
.proj-ucl .proj-when { font-weight: 600; opacity: 0.85; }
.proj-ucl .proj-tagline { color: #fff; font-weight: 600; }
.proj-ucl .proj-facts li { background: #fff; color: #1a1a1a; border: 1px solid #ba82ff; border-radius: 0; font-weight: 600; }
.proj-ucl .proj-link a { color: #ba82ff; }
.proj-ucl-portico { position: absolute; right: 1.25rem; top: 1.25rem; width: 5.5rem; height: auto; fill: #9a3bff; }
@media (max-width: 34rem) {
  .fl-dots span:nth-child(3) { display: none; }
  .proj-ucl { border-left-width: 0.9rem; }
  .proj-ucl-portico { width: 3.5rem; top: auto; bottom: 1.25rem; }
}

/* jenneration.com: wild, colourful, anything goes */
.proj-wild {
  color: #1a1030;
  background: linear-gradient(120deg, #ff5f6d, #ffc371, #f9f871, #5ee7b0, #4fc3ff, #a77bff, #ff6ec7, #ff5f6d);
  background-size: 400% 400%;
  animation: wild-shift 14s ease infinite;
  border: 3px solid #1a1030;
  box-shadow: -6px 6px 0 #a77bff, 6px 12px 0 #4fc3ff;
  transform: rotate(-0.6deg);
  margin-top: 1rem;
}
.proj-wild > * { position: relative; }
.proj-wild .proj-when { font-weight: 700; opacity: 0.8; }
.proj-wild h2 { font-size: 2.6rem; font-weight: 900; line-height: 1.1; margin-bottom: 1rem; }
.proj-wild h2 span span {
  display: inline-block; -webkit-text-stroke: 1.5px #1a1030;
  text-shadow: 3px 3px 0 #1a1030;
  animation: wild-bob 2.4s ease-in-out infinite;
}
.proj-wild h2 span span:nth-child(5n+1) { color: #ff3d7f; transform: rotate(-8deg); font-family: Georgia, serif; font-style: italic; }
.proj-wild h2 span span:nth-child(5n+2) { color: #ffe14d; transform: rotate(6deg); font-family: ui-monospace, Menlo, monospace; }
.proj-wild h2 span span:nth-child(5n+3) { color: #4fc3ff; transform: rotate(-3deg); font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; }
.proj-wild h2 span span:nth-child(5n+4) { color: #5ee7b0; transform: rotate(10deg); font-family: "Courier New", monospace; }
.proj-wild h2 span span:nth-child(5n)   { color: #fff; transform: rotate(-12deg); font-family: Impact, "Arial Black", sans-serif; }
.proj-wild h2 span span:nth-child(2n) { animation-delay: -1.2s; }
.proj-wild h2 span span:nth-child(3n) { animation-delay: -0.6s; }
.wild-panel {
  background: rgba(255,255,255,0.88); border: 2px dashed #1a1030; border-radius: 14px;
  padding: 1rem 1.1rem 0.2rem; transform: rotate(0.8deg);
}
.proj-wild .proj-tagline { color: #a0137a; }
.proj-wild .proj-facts li { background: #1a1030; color: #fff; font-weight: 700; }
.proj-wild .proj-facts li:nth-child(1) { background: #ff3d7f; transform: rotate(-4deg); }
.proj-wild .proj-facts li:nth-child(2) { background: #4f7bff; transform: rotate(3deg); }
.proj-wild .proj-facts li:nth-child(3) { background: #0f9d6b; transform: rotate(-2deg); }
.proj-wild .proj-facts li:nth-child(4) { background: #1a1030; transform: rotate(5deg); }
.wild-sticker {
  position: absolute !important; top: 1rem; right: 1rem; z-index: 1;
  background: #ffe14d; color: #1a1030; border: 2px solid #1a1030; border-radius: 999px;
  padding: 0.3rem 0.8rem; font-weight: 900; font-size: 0.85rem;
  transform: rotate(12deg); box-shadow: 3px 3px 0 #1a1030;
  animation: wild-wobble 3s ease-in-out infinite;
}
.wild-blob { position: absolute !important; border-radius: 50%; filter: blur(2px); opacity: 0.7; animation: wild-float 9s ease-in-out infinite; }
.wild-blob-1 { width: 7rem; height: 7rem; background: #ff6ec7; top: -2rem; left: 40%; }
.wild-blob-2 { width: 4rem; height: 4rem; background: #4fc3ff; bottom: 1rem; right: -1rem; border-radius: 30% 70% 60% 40%; animation-delay: -3s; }
.wild-blob-3 { width: 3rem; height: 3rem; background: #f9f871; bottom: -1rem; left: 1.5rem; border-radius: 0; transform: rotate(45deg); animation-delay: -6s; }
@keyframes wild-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes wild-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes wild-wobble { 0%, 100% { rotate: 0deg; } 50% { rotate: -8deg; } }
@keyframes wild-float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 10px -14px; rotate: 40deg; } }
@media (max-width: 34rem) {
  .proj-wild h2 { font-size: 2rem; }
  .wild-sticker { top: auto; bottom: 0.5rem; right: 0.6rem; font-size: 0.75rem; }
  .proj-wild { padding-bottom: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .proj-wild, .proj-wild h2 span span, .wild-sticker, .wild-blob { animation: none; }
}

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; color: var(--muted); font-size: 0.9rem; }
