/*
  Shared design values (CSS custom properties). Change these colours once to update
  every rule that uses var(...). --ease defines the timing curve used by
  transitions.
*/
:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #606065;
  --blue: #0066cc;
  --surface: #f5f5f7;
  --line: #dedee3;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
/*
  border-box includes padding and borders in declared widths, making layout
  calculations more predictable.
*/
* {
  box-sizing: border-box;
}
/*
  Smooth fragment navigation is offset for the sticky header. The reduced-motion
  rule at the end overrides smooth movement.
*/
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
/*
  System fonts load locally. Removing the default body margin lets each section
  control its own spacing.
*/
body {
  margin: 0;
  background: #fafafa;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a {
  color: inherit;
  text-underline-offset: .25em;
}
/*
  A visible outline tells keyboard users which interactive element will receive
  their next action.
*/
a:focus-visible, summary:focus-visible, button:focus-visible, .certification-track:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
::selection {
  background: #d8eaff;
  color: var(--ink);
}
/*
  Remove browser-default spacing so the page uses a consistent rhythm. clamp(min,
  preferred, max) scales headings within safe limits.
*/
h1, h2, h3, p {
  margin: 0;
}
h1, h2, h3 {
  line-height: 1.1;
  letter-spacing: -.045em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(3rem, 7.5vw, 5.6rem);
  font-weight: 650;
}
h1 span {
  color: #6c727b;
}
h2 {
  font-size: clamp(2.1rem, 4.5vw, 3.15rem);
  font-weight: 600;
}
h3 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.3;
}
/*
  The shared content wrapper has a maximum width and centered margins. calc leaves
  breathing room at the viewport edges.
*/
.wrap {
  width: min(1040px, calc(100% - 4rem));
  margin-inline: auto;
}
/*
  Visually hide supporting text without removing it from the accessibility tree. Do
  not use display:none for screen-reader instructions.
*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/*
  The skip link sits offscreen until focused; its high z-index places it above the
  header when a keyboard user tabs to it.
*/
.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  padding: .7rem 1rem;
  background: white;
  z-index: 20;
}
.skip-link:focus {
  top: 1rem;
}
/*
  Sticky keeps navigation near the top while scrolling. A translucent background and
  backdrop blur soften content behind it.
*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fafafaf2;
  border-bottom: 1px solid #e8e8ec;
  backdrop-filter: blur(18px);
}
/*
  Flexbox arranges a row of items and distributes free space. gap adds spacing
  between items without individual margins.
*/
.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.wordmark {
  text-decoration: none;
  font-weight: 650;
  font-size: 1.15rem;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.wordmark span {
  color: var(--blue);
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .8rem;
  text-decoration: none;
  color: #45454b;
  transition: color .2s;
}
.nav-links a:hover, .footer a:hover {
  color: var(--blue);
}
/*
  Hero styling controls the introductory area. padding-block means top/bottom
  padding in this left-to-right page.
*/
.hero {
  text-align: center;
  padding-block: 44px 64px;
}
.eyebrow {
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  background: #edf4fc;
  border: 1px solid #dae7f7;
  border-radius: 100px;
  padding: .4rem .9rem;
  letter-spacing: .025em;
}
.hero-copy {
  color: var(--muted);
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  line-height: 1.6;
  max-width: 590px;
  margin: 1.5rem auto 0;
  text-wrap: pretty;
}
/*
  flex-wrap allows the primary and secondary actions to move onto separate lines on
  narrow screens.
*/
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.8rem;
}
/*
  Links can look like buttons while keeping link semantics. Hover/active states
  provide feedback without changing document layout.
*/
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  gap: .5rem;
  background: var(--blue);
  color: white;
  padding: .7rem 1.4rem;
  border-radius: 100px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 3px 10px #0066cc12;
  transition: background .2s, box-shadow .25s, transform .25s var(--ease);
}
.button:hover {
  background: #0055aa;
  box-shadow: 0 5px 14px #0066cc25;
  transform: translateY(-1px);
}
.button:active {
  transform: translateY(0);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  color: var(--blue);
  text-decoration: none;
  font-size: .9rem;
}
.text-link:hover {
  text-decoration: underline;
}
.hero-context {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: .78rem;
}
.hero-context span {
  padding-inline: .65rem;
}
/* Reusable section spacing keeps the vertical rhythm consistent across the page. */
.section {
  padding-block: 80px;
}
.about {
  border-top: 1px solid var(--line);
}
/*
  Grid splits the about section into two columns. fr values distribute the available
  width proportionally.
*/
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}
.about-copy {
  color: var(--muted);
  font-size: 1rem;
  text-wrap: pretty;
}
.about-copy p + p {
  margin-top: 1rem;
}
/*
  The description list is a three-column grid on large screens and becomes one
  column on mobile.
*/
.specialisms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.specialisms dt {
  font-weight: 600;
  font-size: .9rem;
}
.specialisms dd {
  color: var(--muted);
  font-size: .85rem;
  margin: .4rem 0 0;
}
.work-band, .contact-band {
  background: var(--surface);
  border-block: 1px solid #e9e9ed;
}
.section-heading {
  max-width: 780px;
  margin-bottom: 2.5rem;
}
.section-intro {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 1.15rem;
  max-width: 600px;
  text-wrap: pretty;
}
/*
  Each work example gets an equal-width column; min-content wrapping and the mobile
  override keep text readable.
*/
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.work-item {
  padding: 1.7rem;
  border: 1px solid #e3e3e8;
  border-radius: 22px;
  background: #ffffffc9;
}
.item-label {
  color: var(--muted);
  font-size: .73rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.work-item h3 {
  font-size: 1.25rem;
  margin-bottom: .9rem;
}
.work-item > p:last-child {
  font-size: .9rem;
  color: var(--muted);
  text-wrap: pretty;
}
/*
  Carousel layout: native overflow provides touch/trackpad scrolling. Keeping slide
  boxes untransformed lets JavaScript measure reliable positions.
*/
/* Badge geometry stays fixed; only the artwork animates. */
/*
  Respect the HTML hidden attribute even when a component rule also sets
  display:flex or display:grid.
*/
[hidden] {
  display: none !important;
}
/*
  The slide width is shared with the track padding below. vw means a percentage of
  viewport width, so slides also fit mobile screens.
*/
.certification-carousel {
  --badge-slide-width: min(76vw, 380px);
}
/*
  Symmetric side padding lets the first and last badges reach the centre. Scroll
  snapping settles slides at their centre, matching carousel.js destination
  calculations.
*/
.certification-track {
  display: flex;
  gap: clamp(1rem, 4vw, 3rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding: 1rem calc((100% - var(--badge-slide-width)) / 2) 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #b9b9c2 transparent;
  border-radius: 26px;
  background: radial-gradient(ellipse at 50% 30%, #eaf2ff 0%, #fafafa00 65%);
}
/*
  flex: 0 0 fixes each slide to its preferred width without growing or shrinking.
  Only the image inside the slide will animate.
*/
.credential {
  flex: 0 0 var(--badge-slide-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: .5rem .75rem 0;
}
.credential .item-label {
  margin-bottom: .65rem;
}
.credential h3 {
  font-size: 1.15rem;
  margin-bottom: .7rem;
  max-width: 340px;
}
.credential > p:not(.item-label) {
  color: var(--muted);
  font-size: .88rem;
}
/*
  A stable artwork area prevents different badge proportions from moving the
  captions around.
*/
.badge-art {
  position: relative;
  width: 100%;
  height: 300px;
  display: grid;
  place-items: center;
  margin-bottom: 1.5rem;
}
/*
  A pseudo-element draws the soft shadow without adding decorative HTML.
  pointer-events:none lets input pass through the shadow.
*/
.badge-art::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 120px;
  height: 10px;
  border-radius: 50%;
  background: #163b6120;
  filter: blur(7px);
  pointer-events: none;
}
/*
  object-fit:contain preserves the complete badge image. Transforms provide depth
  without changing the slide size or its measured centre.
*/
.badge-art img {
  position: relative;
  z-index: 1;
  width: 250px;
  height: 250px;
  max-width: 96%;
  object-fit: contain;
  user-select: none;
  transform: perspective(800px) translateY(-4px) scale(1);
  transition: transform .75s var(--ease), opacity .5s var(--ease);
}
/*
  The tall BCS issuer logo uses its own dimensions so it keeps its proportions
  alongside square badges.
*/
.badge-art-issuer img {
  width: 155px;
  height: 196px;
}
/*
  JavaScript adds state classes. Side badges tilt and fade; the centred badge gets a
  short entrance animation. Without JS these state rules do not apply.
*/
.is-enhanced .credential:not(.is-active)
.badge-art img {
  opacity: .55;
  transform: perspective(800px) translateY(16px) rotateY(-14deg) scale(.78);
}
.is-enhanced .credential.is-before
.badge-art img {
  transform: perspective(800px) translateY(16px) rotateY(14deg) scale(.78);
}
.is-enhanced .credential.is-active
.badge-art img {
  opacity: 1;
  animation: badge-arrive .8s var(--ease) both;
}
/*
  The auto top margin aligns certification links at the bottom of equally tall
  slides. The minimum height improves pointer/touch access.
*/
.credential-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  color: var(--blue);
  font-size: .85rem;
  margin-top: auto;
  padding-top: 1rem;
  text-decoration: none;
}
.credential-link:hover {
  text-decoration: underline;
}
.carousel-hint {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: .5rem;
}
/*
  A three-column grid keeps status, position dots, and arrows aligned. Mobile rules
  rearrange the dots into their own row.
*/
.carousel-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: .5rem;
}
.carousel-status {
  color: var(--muted);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.carousel-pagination {
  display: flex;
  justify-content: center;
  gap: 0;
}
/*
  Each visible dot has a larger 44px button around it, making the small visual
  control easier to tap.
*/
.carousel-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.carousel-dot span {
  width: 7px;
  height: 7px;
  border-radius: 100px;
  background: #747c89;
  transition: width .35s var(--ease), background .35s;
}
/*
  The script updates aria-current on the selected dot. That accessible state also
  drives its wider blue appearance.
*/
.carousel-dot[aria-current="true"] span {
  width: 24px;
  background: var(--blue);
}
.carousel-dot:hover span {
  background: var(--blue);
}
.carousel-buttons {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
}
.carousel-arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #dedee3;
  border-radius: 50%;
  background: #f0f0f3;
  color: var(--ink);
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .2s, transform .25s var(--ease);
}
.carousel-arrow:hover:not(:disabled) {
  background: #e4eaf2;
  transform: translateY(-1px);
}
.carousel-arrow:active:not(:disabled) {
  transform: scale(.96);
}
/*
  Native disabled buttons cannot be activated; the faded appearance communicates the
  first/last navigation boundary.
*/
.carousel-arrow:disabled {
  opacity: .4;
  cursor: default;
}
/*
  Keyframes describe a single entrance: start lower and smaller, overshoot slightly,
  then settle. This animation does not loop or advance the carousel.
*/
@keyframes badge-arrive {
  0% {
    transform: perspective(800px) translateY(14px) rotate(-5deg) scale(.88);
  }
  55% {
    transform: perspective(800px) translateY(-12px) rotate(2deg) scale(1.04);
  }
  100% {
    transform: perspective(800px) translateY(-4px) rotate(0) scale(1);
  }
}
/*
  Education remains outside the scroll track. Borders and a two-column grid
  distinguish the degree from the badge showcase.
*/
.education {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-block: 2.5rem;
  border-block: 1px solid var(--line);
}
.education .eyebrow {
  margin-bottom: .8rem;
}
.degree-result {
  color: var(--blue);
  font-size: .9rem;
  font-weight: 600;
  margin-top: .7rem;
}
.education > div:last-child {
  color: var(--muted);
  font-size: .9rem;
}
.university {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: .3rem;
}
.dissertation {
  margin-top: 1rem;
  max-width: 400px;
}
.community {
  border-bottom: 1px solid var(--line);
}
/*
  The browser handles disclosure and keyboard interaction; CSS only customizes the
  visible summary and plus symbol.
*/
.community summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.4rem;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.community summary::-webkit-details-marker {
  display: none;
}
.community summary span {
  font-size: 1.4rem;
  color: var(--muted);
  transition: transform .3s var(--ease);
}
.community[open] summary span {
  transform: rotate(45deg);
}
.community-content {
  max-width: 720px;
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}
.community-content p + p {
  margin-top: .75rem;
}
/*
  Centre the contact section and limit paragraph width so long lines stay
  comfortable to read.
*/
.contact {
  text-align: center;
}
.contact > p:not(.eyebrow) {
  margin: 1.25rem auto 1.7rem;
  color: var(--muted);
  max-width: 440px;
}
/* Allow footer items to wrap rather than overflow on small screens. */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  color: var(--muted);
  font-size: .75rem;
}
.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.footer p {
  align-self: center;
}
/* Tablet breakpoint: reduce gaps and padding as the available width decreases. */
@media (max-width: 850px) {

  .about-layout {
    gap: 2rem;
  }
  .work-item {
    padding: 1.4rem;
  }

  .work-grid {
    gap: .75rem;
  }
}
/*
  Mobile breakpoint: stack content and navigation, resize badge artwork, and give
  the position dots a separate row. Later rules override earlier ones with the same
  specificity.
*/
@media (max-width: 600px) {
  html {
    scroll-padding-top: 8rem;
  }

  .wrap {
    width: calc(100% - 2.5rem);
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    padding-block: .7rem .35rem;
  }
  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: .6rem;
  }
  .nav-links a {
    font-size: .75rem;
  }

  .hero {
    padding-block: 2rem 3rem;
  }
  h1 {
    font-size: clamp(2.4rem, 9vw, 3.6rem);
  }
  .hero-copy {
    max-width: 340px;
  }
  .hero-context {
    max-width: 290px;
    margin: 2rem auto 0;
    line-height: 2;
  }
  .hero-context span {
    padding-inline: .2rem;
  }

  .section {
    padding-block: 3.5rem;
  }
  .about-layout, .specialisms, .work-grid,
  .education {
    grid-template-columns: 1fr;
  }

  .about-layout {
    gap: 1.5rem;
  }

  .specialisms {
    gap: 1.4rem;
    margin-top: 2rem;
  }

  .work-grid {
    gap: 1rem;
  }
  .work-item {
    padding: 1.5rem;
  }

  .credential {
    padding-inline: .25rem;
  }

  .badge-art {
    height: 244px;
    margin-bottom: 1rem;
  }

  .badge-art img {
    width: 206px;
    height: 206px;
  }

  .badge-art-issuer img {
    width: 132px;
    height: 167px;
  }

  .carousel-controls {
    grid-template-columns: 1fr auto;
    gap: .5rem;
  }
  .carousel-pagination {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .carousel-status {
    font-size: .75rem;
  }

  .education {
    gap: 1.5rem;
  }
  .section-heading {
    margin-bottom: 2rem;
  }

  .footer {
    justify-content: flex-start;
    gap: .5rem 1.5rem;
  }
}
/*
  Honour the operating-system preference by removing animated transforms and
  transitions. JavaScript separately makes carousel scrolling instant.
*/
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }
  .button, .nav-links a, .badge-art img, .carousel-arrow, .carousel-dot span, .community summary span {
    transition: none;
  }
  .is-enhanced .credential.is-active
  .badge-art img {
    animation: none;
  }
  .badge-art img,
  .is-enhanced .credential:not(.is-active) .badge-art img, .is-enhanced .credential.is-before .badge-art img, .button:hover, .carousel-arrow:hover:not(:disabled), .carousel-arrow:active:not(:disabled) {
    transform: none;
  }
}
