@font-face {
  font-family: Jalvair;
  src: url("/type/handwriting.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Parceh;
  src: url("/type/Parceh.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0020, U+0026, U+002C, U+002E, U+0041-005A, U+0061-007A;
}

@font-face {
  font-family: DM Sans;
  src: url("/type/dm-sans.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #0c1724;
  --surface: #15273b;
  --ink: #e6eef7;
  --muted: #a6b8cb;
  --accent: #a4c8ed;
  --line: #30465e;
  --glass: #112237e6;
  --shadow: #030a1340;
  --serif: Parceh, Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --gutter: clamp(24px, 6vw, 100px);
  --ease: cubic-bezier(0.22, 0.75, 0.18, 1);
  --scroll-thumb: #4c6784;
  --scroll-hover: #a6b8cb;
  --scroll-active: #a4c8ed;
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #e9f0f7;
  --surface: #d8e5f1;
  --ink: #203a55;
  --muted: #536b83;
  --accent: #315f91;
  --line: #b5c9dc;
  --glass: #edf4fbeb;
  --shadow: #203a5514;
  --scroll-thumb: #7d98b2;
  --scroll-hover: #536b83;
  --scroll-active: #315f91;
}

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

* {
  scrollbar-color: var(--scroll-thumb) var(--paper);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid var(--paper);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 400;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button,
a,
select {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
svg,
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
main:focus {
  outline: none;
}

.wrap {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  width: 100%;
}
.section {
  padding-block: 95px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}
.accent {
  color: var(--accent);
}

h2 {
  font: clamp(40px, 4.5vw, 67px)/1.16 var(--serif);
  letter-spacing: -0.02em;
}
.arrow {
  width: 20px;
  height: 20px;
  flex: none;
  transition: transform 0.3s var(--ease);
}
a:hover > .arrow {
  transform: translate(3px, -3px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  padding: 0;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.pending {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.text-link,
.button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  font-size: 12px;
}
.text-link:hover {
  color: var(--accent);
}
.button {
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
}
.button:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Shared expanding-fill action, adapted to this palette from Obsidian DiscoverButton. */

.discover-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  font-size: 12px;
  line-height: 1.3;
  isolation: isolate;
  transition: transform 0.2s;
}

.discover-fill {
  position: absolute;
  inset: 4px auto 4px 4px;
  width: 44px;
  border-radius: inherit;
  background: var(--ink);
  transition: width 0.48s cubic-bezier(0.65, 0, 0.076, 1);
  z-index: -1;
}
.discover-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  color: var(--paper);
  transition: transform 0.48s var(--ease);
}
.discover-label {
  padding: 0 24px 0 10px;
  transition: color 0.3s;
}
.discover-button:is(:hover, :focus-visible) .discover-fill {
  width: calc(100% - 8px);
}
.discover-button:is(:hover, :focus-visible) .discover-label {
  color: var(--paper);
}
.discover-button:is(:hover, :focus-visible) .discover-icon {
  transform: translateX(5px);
}
.discover-button:active {
  transform: scale(0.98);
}
.section-action {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

/* Only the homepage owns global navigation. */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: max(26px, env(safe-area-inset-top))
    max(38px, env(safe-area-inset-right)) 26px
    max(38px, env(safe-area-inset-left));
  pointer-events: none;
  color: var(--ink);
}
.site-header > * {
  pointer-events: auto;
}

.navigation {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--glass);
  box-shadow: 0 5px 30px var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 0.4s var(--ease),
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease);
  transform-origin: 50% 0;
}
.site-header.is-compact .navigation {
  transform: scale(0.89);
}

.navigation > a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 99px;
  font-size: 11px;
  white-space: nowrap;
  line-height: 1.4;
  transition: color 0.25s;
}
.navigation > a:hover {
  color: var(--accent);
}
.nav-indicator {
  position: absolute;
  left: 0;
  top: 6px;
  height: calc(100% - 12px);
  width: 0;
  border-radius: 99px;
  background: var(--ink);
  opacity: 0;
  transition:
    transform var(--nav-speed, 300ms) var(--ease),
    width var(--nav-speed, 300ms) var(--ease),
    opacity 0.2s;
  will-change: transform;
}
.navigation > a[aria-current] {
  color: var(--paper);
}
.navigation:not(.nav-ready) > a[aria-current] {
  background: var(--ink);
}

.theme-toggle,
.header-resume {
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px var(--shadow);
  height: 46px;
  border-radius: 99px;
}
.theme-toggle {
  justify-self: start;
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
}
.theme-toggle svg {
  position: absolute;
  width: 20px;
  height: 20px;
  transition:
    opacity 0.4s,
    transform 0.5s var(--ease);
}
[data-theme="dark"] .moon,
[data-theme="light"] .sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.7);
}
[data-theme="dark"] .sun,
[data-theme="light"] .moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.header-resume {
  justify-self: end;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 0 18px;
  font-size: 11px;
}
.header-resume .arrow {
  width: 16px;
  height: 16px;
}
.hero-control {
  transition:
    opacity 0.35s var(--ease),
    transform 0.4s var(--ease);
}
.site-header:not(.over-hero) .hero-control {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}
.over-hero {
  color: #f1f5fc;
}
.over-hero .navigation,
.over-hero .hero-control {
  --ink: #f1f5fc;
  --paper: #172b43;
  --line: #edf4ff40;
  --glass: #102238a8;
  --accent: #c2defa;
}

/* Fixed photo composition; the light blend moves through foliage greens into sage. */

.footer-signature [data-signature-letter] > path {
  stroke: none;
  stroke-width: 0;
  stroke-linejoin: round;
  stroke-linecap: round;
  paint-order: stroke fill;
}

.contact-email > a {
  transition: color 0.2s;
}

.contact-email > a:focus-visible,
.social-links .text-link:focus-visible {
  color: var(--accent);
}

.social-links .text-link > .arrow {
  width: 16px;
  height: 16px;
}

.subpage-theme-toggle {
  position: fixed;
  z-index: 50;
  top: max(24px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
}

.inner-page .back-link,
.inner-page .project-breadcrumb {
  max-width: calc(100% - 64px);
}

@media (max-width: 600px) {
  .subpage-theme-toggle {
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
  }
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  height: 100svh;
  max-height: 1200px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.7s var(--ease);
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -3;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, #08142412, #0814240d 45%, #08142405);
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 18%;
  z-index: -1;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--paper) 18%, transparent) 26%,
    color-mix(in srgb, var(--paper) 66%, transparent) 67%,
    var(--paper)
  );
}
.hero-title {
  padding: 0 25px 24px;
  text-align: center;
  color: #f0f5fc;
  width: 100%;
}
.hero h1 {
  font:
    clamp(60px, 8.45vw, 136px)/1.25 Jalvair,
    Georgia,
    serif;
  letter-spacing: 0.005em;
  text-shadow: 0 4px 24px #061225b3;
}
.hero-title { transition: opacity 900ms ease; }
.booting .hero-title { opacity: 0; }

.intro-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 12%;
  padding: 25px 0 90px;
  min-height: 650px;
}
.intro-copy .eyebrow {
  margin-bottom: 22px;
}
.intro-copy h2 {
  margin-bottom: 26px;
}
.intro-copy > p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.9;
  color: var(--muted);
}
.intro-copy > p + p {
  margin-top: 17px;
}
.intro-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 24px;
}
.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
}
.portrait-wrap {
  width: 100%;
  max-width: 375px;
  justify-self: end;
  perspective: 1200px;
}
.portrait {
  position: relative;
  overflow: hidden;
  border-radius: 180px 180px 26px 26px;
  aspect-ratio: 3/4.2;
  transform: perspective(1000px) rotateX(var(--portrait-x, 0deg))
    rotateY(var(--portrait-y, 0deg));
  transition: transform 0.35s var(--ease);
  background: var(--surface);
  box-shadow: 0 22px 55px var(--shadow);
}
.home-page .portrait img {
  object-position: center 44%;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 34%;
}
.portrait-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, #fff0 20%, #fff2 50%, #fff0 80%);
  opacity: 0;
  transform: translateX(-50%);
  transition:
    opacity 0.4s,
    transform 0.7s;
}
.portrait:hover .portrait-sheen {
  opacity: 0.28;
  transform: translateX(40%);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 50px;
}
.section-heading .eyebrow {
  margin-bottom: 22px;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px 50px;
}
.project-card {
  min-width: 0;
}
.project-art {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  padding: 12px 15px;
  transition: transform 0.5s var(--ease);
}
.project-card:hover .project-art {
  transform: translateY(-5px);
}
.project-diagram {
  width: 100%;
  aspect-ratio: 600/360;
  color: var(--ink);
  height: auto;
}
.accent-stroke {
  stroke: var(--accent);
}
.diagram-label {
  fill: var(--muted);
  font: 10px var(--sans);
  letter-spacing: 0.7px;
}
.art-caption {
  display: block;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 0 9px;
}
.project-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 23px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.project-card h3 {
  font: 28px/1.4 var(--serif);
  margin-top: 10px;
  letter-spacing: -0.02em;
}
.project-card h3 > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.project-card h3 > a:hover {
  color: var(--accent);
}
.project-card > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
  margin-top: 12px;
  max-width: 520px;
}
.project-status {
  display: inline-block;
  margin-top: 17px;
  font-size: 10px;
  color: var(--accent);
}
.award {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 8px 14px 8px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 40px;
  color: var(--accent);
  font-size: 10px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.award svg {
  width: 30px;
  height: 30px;
}

.role-preview {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 180px 24px;
  gap: 30px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.role-preview:last-child {
  border-bottom: 1px solid var(--line);
}
.role-preview h3 {
  font: clamp(22px, 2.5vw, 34px)/1.4 var(--serif);
  transition:
    transform 0.4s var(--ease),
    color 0.2s;
}
.role-preview p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.role-preview-date {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.role-preview:hover h3 {
  color: var(--accent);
  transform: translateX(7px);
}

.learning-section {
  padding-block: 70px;
}
.learning-section h2 {
  margin-top: 18px;
}
.education-compact {
  margin-top: 32px;
}
.education-compact > .education-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 25px 0;
}
.education-compact h3 {
  font: clamp(22px, 2.5vw, 34px)/1.4 var(--serif);
  transition:
    transform 0.4s var(--ease),
    color 0.2s;
}
.education-compact p,
.education-compact > .education-entry > span:nth-child(2) {
  color: var(--muted);
  font-size: 11px;
}
.education-compact > .education-entry > span:nth-child(2) {
  text-align: right;
}
.education-compact strong {
  font-weight: 600;
}

.marquee {
  width: 100%;
  overflow: hidden;
  touch-action: auto;
  cursor: grab;
  padding: 15px 0 20px;
  isolation: isolate;
}
.marquee.is-dragging {
  cursor: grabbing;
}
.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee-set {
  display: flex;
  gap: 28px;
  padding-right: 28px;
}
.marquee-set img {
  flex: none;
  width: 360px;
  height: 240px;
  object-fit: cover;
  background: var(--surface);
  border-radius: 14px;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}
.circle-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.circle-control:hover {
  background: var(--surface);
}
[data-marquee-prev] .arrow {
  transform: rotate(180deg);
}
.marquee-pause {
  min-width: 60px;
  min-height: 44px;
  font-size: 10px;
  background: none;
  border: 0;
  color: var(--muted);
}
.certifications-section .section-action {
  margin-top: 22px;
}

.contact-section h2 {
  font-size: clamp(44px, 5.6vw, 80px);
  margin-top: 25px;
}
.contact-email {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 20px 0 8px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}
.contact-email > a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.35vw, 19px);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
}
.contact-email > a:hover {
  color: var(--accent);
}
.copy-email {
  position: relative;
  flex: none;
  background: #e6eef7;
  color: #203a55;
  border: 0;
  border-radius: 25px;
  font-size: 10px;
  width: 104px;
  height: 40px;
  overflow: hidden;
  transition:
    box-shadow 0.25s,
    transform 0.25s;
  margin-left: auto;
}
.copy-email:hover {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 12%, transparent);
}
.copy-email:active {
  transform: scale(0.97);
}
.copy-idle,
.copy-done {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.35s var(--ease),
    opacity 0.3s;
}
.copy-done {
  transform: translateY(100%);
  opacity: 0;
}
.copy-done svg {
  width: 17px;
  height: 17px;
}
.copy-done path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.4s 0.15s;
}
.copy-email.copied .copy-idle {
  transform: translateY(-100%);
  opacity: 0;
}
.copy-email.copied .copy-done {
  transform: none;
  opacity: 1;
}
.copy-email.copied .copy-done path {
  stroke-dashoffset: 0;
}
.social-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.social-links .text-link {
  font-size: 12px;
  gap: 12px;
}
.site-footer {
  padding-block: 35px 45px;
  text-align: center;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.site-footer p {
  font-size: 10px;
  margin-bottom: 9px;
}
.footer-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(210px, 21vw, 260px);
  max-width: 100%;
  min-height: 64px;
  color: var(--ink);
}
.footer-signature {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.signature-ready .signature-stroke {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

/* Collection routes have only local back navigation. */

.collection,
.project-page {
  padding-top: 55px;
  padding-bottom: 85px;
}
.collection-heading {
  margin-bottom: 65px;
  max-width: 900px;
}
.back-link,
.project-breadcrumb > a {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-size: 11px;
  min-height: 44px;
  color: var(--muted);
}
.back-link .arrow,
.project-breadcrumb > a .arrow {
  transform: rotate(180deg);
  width: 16px;
}
.collection-heading > .eyebrow {
  margin-top: 40px;
}
.collection-heading h1,
.project-heading h1 {
  font: clamp(48px, 6.5vw, 92px)/1.25 var(--serif);
  letter-spacing: -0.035em;
  margin-top: 20px;
}
.collection-heading > p:not(.eyebrow) {
  font-size: 15px;
  color: var(--muted);
  margin-top: 20px;
  max-width: 600px;
}
.experience-record {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12%;
  padding: 50px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 40px;
}
.experience-record h2 {
  font-size: 29px;
  line-height: 1.4;
  margin-top: 14px;
}
.record-role {
  margin-bottom: 22px;
}
.record-role h3 {
  font-size: 16px;
}
.record-role > span {
  font-size: 10px;
  color: var(--muted);
}
.experience-record p,
.experience-record li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.experience-record ul {
  padding-left: 18px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
}
.tags > span {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 6px 12px;
  font-size: 10px;
  color: var(--muted);
}









.about-detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12%;
  align-items: start;
}
.about-detail p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 22px;
}
.about-detail-photo {
  border-radius: 160px 160px 24px 24px;
  max-width: 360px;
  width: 100%;
  justify-self: end;
  height: auto;
  aspect-ratio: 3/4.2;
  object-fit: cover;
}
.about-toolkit-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 70px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.curiosity-mark {
  width: min(300px, 100%);
  margin-top: 20px;
  color: var(--accent);
  touch-action: pan-y;
  transform: perspective(600px) rotateX(var(--curiosity-x, 0deg)) rotateY(var(--curiosity-y, 0deg)) scale(var(--curiosity-scale, 1));
  transition: transform 550ms cubic-bezier(.22,.75,.18,1);
}

.curiosity-mark svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: curiosity-float 4.4s ease-in-out infinite paused;
}

.curiosity-links {
  stroke: var(--line);
  stroke-width: 1;
  opacity: .65;
}
.curiosity-stars { fill: currentColor; }
.curiosity-stars circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: curiosity-twinkle 3.1s ease-in-out infinite paused;
}
.curiosity-stars circle:nth-child(2n) { animation-delay: -1.7s; }
.curiosity-stars circle:nth-child(3n) { animation-delay: -3.4s; }
.curiosity-star {
  fill: currentColor;
  transform-origin: 164px 51px;
  animation: curiosity-shimmer 3.9s ease-in-out infinite paused;
}
.curiosity-satellites { fill: currentColor; }
.curiosity-satellites path {
  transform-box: fill-box;
  transform-origin: center;
  animation: curiosity-drift 3.3s ease-in-out infinite paused;
}
.curiosity-satellites path:nth-child(2) { animation-delay: -2s; }
.curiosity-halo {
  stroke: currentColor;
  stroke-width: .8;
  opacity: .3;
  transform-origin: 164px 51px;
  animation: curiosity-halo 3.9s ease-in-out infinite paused;
}
.curiosity-mark.is-active .curiosity-star,
.curiosity-mark.is-active .curiosity-satellites path,
.curiosity-mark.is-active svg,
.curiosity-mark.is-active .curiosity-stars circle,
.curiosity-mark.is-active .curiosity-halo { animation-play-state: running; }
@keyframes curiosity-float {
  0%, 100% { transform: translateY(2px); }
  50% { transform: translateY(-2px); }
}
@keyframes curiosity-twinkle {
  0%, 100% { opacity: .45; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes curiosity-shimmer {
  0%, 100% { transform: rotate(-12deg) scale(.9); opacity: .7; }
  50% { transform: rotate(12deg) scale(1.15); opacity: 1; }
}
@keyframes curiosity-drift {
  0%, 100% { transform: translateY(2px) scale(.75); opacity: .25; }
  50% { transform: translateY(-3px) scale(1); opacity: .8; }
}
@keyframes curiosity-halo {
  50% { transform: scale(1.25); opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  .curiosity-mark { transform: none; transition: none; }
  .curiosity-mark svg, .curiosity-stars circle, .curiosity-halo, .curiosity-star, .curiosity-satellites path { animation: none; }
}

.toolkit-group {
  border-top: 1px solid var(--line);
  padding: 65px 0 95px;
  scroll-margin-top: 65px;
}

.toolkit-group:focus {
  outline: none;
}

.toolkit-group h2 {
  font-size: 43px;
  margin: 16px 0 45px;
}

.toolkit-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 45px 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.toolkit-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.toolkit-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #e9f0f7;
  box-shadow: 0 8px 26px var(--shadow);
}

:root[data-theme="light"] .toolkit-page .toolkit-logo {
  background: #d8e5f1;
}

.toolkit-logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.toolkit-name {
  font-size: 14px;
  text-align: center;
}

.quantum-concepts {
  margin-top: 34px;
  color: var(--muted);
  font-size: 12px;
}

.project-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.project-heading {
  padding-top: 35px;
  max-width: 1000px;
}

.project-subtitle {
  font-size: 18px;
  color: var(--muted);
  margin-top: 22px;
}

.project-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12%;
  margin-top: 45px;
}

.large-copy {
  font-size: 21px;
  line-height: 1.8;
}

.project-facts {
  margin: 0;
}

.project-facts > div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.project-facts dt {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-facts dd {
  margin: 0;
  font-size: 12px;
}

.project-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 32px 0 45px;
}

.detail-visual {
  padding: 30px 13%;
  border-radius: 22px;
  background: var(--surface);
}

.detail-visual .project-diagram {
  max-height: 390px;
}

.detail-visual figcaption {
  text-align: center;
  font-size: 8px;
  margin-top: 15px;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12%;
  padding: 65px 0;
}

.stack-list {
  list-style: none;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 2.2;
}

.project-narrative section + section {
  margin-top: 40px;
}

.project-narrative h2 {
  font-size: 33px;
  line-height: 1.4;
  margin: 12px 0 20px;
}

.project-narrative p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.95;
}

.project-narrative p + p {
  margin-top: 18px;
}

.project-metric {
  padding: 25px 0;
  border-block: 1px solid var(--line);
  margin-top: 25px;
}

.project-metric strong {
  font: 58px var(--serif);
  color: var(--accent);
}

.project-metric figcaption {
  font-size: 12px;
  margin-top: 14px;
}

.project-metric small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}

.project-pending {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 15px;
}

.project-pending h2 {
  font-size: 23px;
  margin-top: 0;
}

.project-pending ul {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  padding-left: 18px;
  margin-bottom: 0;
}

.next-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 25px;
  padding: 35px 0;
  border-top: 1px solid var(--line);
}

.next-project > .arrow {
  justify-self: end;
}

.next-project > span:nth-child(2) {
  text-align: center;
  overflow-wrap: anywhere;
  font: 35px/1.5 var(--serif);
}

.next-project:hover {
  color: var(--accent);
}

.not-found {
  min-height: 75vh;
  padding-block: 180px 80px;
}

.not-found h1 {
  font: 65px/1.35 var(--serif);
  margin-block: 30px;
}

.not-found .button {
  margin-top: 25px;
}

/* Motion and responsive fallbacks also keep content usable without JavaScript. */

.marquee {
  overflow-x: auto;
  scroll-behavior: auto;
}

@keyframes logo-float {
  50% {
    transform: translateY(-5px);
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready {
    transition:
      opacity 0.5s var(--ease),
      transform 0.55s var(--ease);
    transition-delay: calc(var(--stagger, 0) * 40ms);
  }

  .reveal-ready:not(.is-visible) {
    opacity: 0;
    transform: translateY(20px);
  }

  .reveal-ready:focus-within {
    opacity: 1;
    transform: none;
  }

  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root) {
    animation-duration: 0.25s;
  }

  ::view-transition-new(root) {
    animation: page-enter 0.35s var(--ease);
  }

  .theme-changing::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
  }

  .theme-changing::view-transition-old(root) {
    animation: none;
    mix-blend-mode: normal;
  }

  ::view-transition {
    pointer-events: none;
  }
}

@media (max-width: 1100px) {
  .site-header {
    padding: 22px;
    gap: 12px;
  }
  .navigation > a {
    font-size: 10px;
    padding: 12px 10px;
  }
  .intro-layout {
    gap: 8%;
  }
  .project-grid {
    gap: 45px 30px;
  }
  .header-resume {
    padding-inline: 13px;
    gap: 8px;
  }
  .toolkit-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  :root {
    --gutter: 28px;
  }
  .site-header {
    grid-template-columns: 1fr 1fr;
    row-gap: 12px;
    padding: 16px 22px;
  }
  .theme-toggle {
    grid-column: 1;
    grid-row: 1;
  }
  .header-resume {
    grid-column: 2;
    grid-row: 1;
  }
  .navigation {
    grid-column: 1/-1;
    grid-row: 2;
    justify-self: center;
    max-width: 100%;
  }
  .navigation > a {
    padding: 12px 11px;
    font-size: 12px;
  }
  .site-header:not(.over-hero) .navigation {
    transform: translateY(-58px);
  }
  .site-header.is-compact .navigation {
    transform: none;
  }
  .site-header.is-compact:not(.over-hero) .navigation {
    transform: translateY(-58px);
  }
  .hero h1 {
    font-size: 8.75vw;
  }
  .section {
    padding-block: 70px;
  }
  .intro-copy > p:not(.eyebrow) {
    font-size: 15px;
  }
  .intro-layout {
    gap: 7%;
    padding-bottom: 60px;
  }
  .project-card h3 {
    font-size: 25px;
  }
  .experience-record {
    gap: 7%;
  }
  .contact-email > a {
    font-size: 17px;
    gap: 15px;
  }
  .collection-heading h1,
  .project-heading h1 {
    font-size: clamp(42px, 7.4vw, 60px);
  }
  .role-preview {
    grid-template-columns: 1fr 145px 20px;
    gap: 20px;
  }
  .project-overview,
  .project-body {
    gap: 7%;
  }
  .about-detail {
    gap: 8%;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: clamp(20px, 5.5vw, 28px);
  }
  html {
    scroll-padding-top: 100px;
  }
  .site-header {
    padding: max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right)) 12px
      max(12px, env(safe-area-inset-left));
    gap: 10px;
  }
  .navigation {
    width: 100%;
    justify-content: flex-start;
    gap: 2px;
    padding: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 8px;
    scrollbar-width: thin;
    border-radius: 30px;
  }
  .navigation > a {
    font-size: 12px;
    padding: 12px 15px;
    min-height: 46px;
  }
  .navigation > a:focus-visible {
    outline-offset: -3px;
  }
  .nav-indicator {
    top: 5px;
    height: 46px;
  }
  .site-header.is-compact .navigation {
    transform: none;
  }
  .site-header.is-compact:not(.over-hero) .navigation {
    transform: translateY(-58px);
  }
  .theme-toggle {
    width: 44px;
    height: 44px;
  }
  .header-resume {
    height: 44px;
    font-size: 12px;
  }
  .hero {
    height: 100svh;
    min-height: 500px;
  }
  .hero h1 {
    font-size: 12.55vw;
    line-height: 1.5;
  }
  .hero-title {
    padding-inline: 17px;
  }
  .hero-image {
    object-position: 52% center;
  }
  .hero::after {
    height: 17%;
  }
  h2 {
    font-size: 39px;
  }
  .section {
    padding-block: 58px;
  }
  .intro-layout {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 0 0 55px;
  }
  .intro-copy h2 {
    font-size: 40px;
  }
  .intro-copy > p:not(.eyebrow) {
    font-size: 15px;
  }
  .portrait-wrap {
    width: 80%;
    max-width: 320px;
    align-self: center;
  }
  .intro-links {
    margin-top: 24px;
  }
  .discover-button {
    font-size: 11px;
    min-height: 52px;
  }
  .discover-label {
    padding-right: 20px;
  }
  .section-heading {
    margin-bottom: 32px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .project-card h3 {
    font-size: 28px;
  }
  .project-art {
    padding: 10px;
  }
  .role-preview {
    grid-template-columns: 1fr 20px;
    gap: 8px;
    padding: 26px 0;
  }
  .role-preview-date {
    grid-column: 1;
    text-align: left;
  }
  .role-preview > .arrow {
    grid-column: 2;
    grid-row: 1/3;
  }
  .role-preview h3 {
    font-size: 26px;
  }
  .education-compact > .education-entry {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }
  .education-compact > .education-entry > span:nth-child(2) {
    white-space: nowrap;
  }
  .education-compact > .education-entry > .arrow {
    grid-column: 2;
    grid-row: 1/3;
  }
  .education-compact h3 {
    font-size: 26px;
  }
  .marquee-set {
    gap: 18px;
    padding-right: 18px;
  }
  .marquee-set img {
    width: min(280px, 80vw);
    height: auto;
    aspect-ratio: 3/2;
  }
  .contact-section h2 {
    font-size: 43px;
  }
  .contact-email {
    display: flex;
    margin-top: 24px;
    padding: 16px 0 4px;
    gap: 8px 16px;
  }
  .contact-email > a {
    font-size: 15px;
    gap: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .contact-email > a .arrow {
    width: 16px;
  }
  .copy-email {
    margin-top: 0;
    width: 102px;
    height: 40px;
    font-size: 10px;
  }
  .social-links {
    gap: 12px 24px;
  }
  .social-links .text-link {
    font-size: 13px;
  }
  .collection,
  .project-page {
    padding-top: 25px;
    padding-bottom: 55px;
  }
  .collection-heading {
    margin-bottom: 35px;
  }
  .collection-heading h1,
  .project-heading h1 {
    font-size: 44px;
    overflow-wrap: anywhere;
  }
  .collection-heading > .eyebrow {
    margin-top: 28px;
  }
  .collection-heading > p:not(.eyebrow) {
    font-size: 13px;
  }
  .experience-record {
    display: block;
    padding-block: 30px;
  }
  .experience-record h2 {
    font-size: 28px;
    margin-bottom: 24px;
  }






  .about-detail {
    display: flex;
    flex-direction: column;
    gap: 35px;
  }
  .about-detail p {
    font-size: 15px;
  }
  .about-detail-photo {
    width: 80%;
    max-width: 310px;
  }
  .about-toolkit-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
    margin-top: 45px;
  }
  .toolkit-group {
    padding: 40px 0 65px;
  }
  .toolkit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px 10px;
  }
  .toolkit-logo {
    width: 66px;
    height: 66px;
  }
  .toolkit-logo img {
    width: 38px;
    height: 38px;
  }
  .toolkit-name {
    font-size: 12px;
  }
  .toolkit-group h2 {
    font-size: 34px;
    margin-bottom: 30px;
  }
  .project-overview {
    display: block;
    margin-top: 25px;
  }
  .project-facts {
    margin-top: 25px;
  }
  .project-subtitle {
    font-size: 16px;
  }
  .large-copy {
    font-size: 18px;
  }
  .project-body {
    display: flex;
    flex-direction: column-reverse;
    gap: 30px;
    padding-block: 35px;
  }
  .project-narrative h2 {
    font-size: 28px;
  }
  .detail-visual {
    padding: 20px 8px;
  }
  .project-breadcrumb {
    gap: 12px;
  }
  .project-breadcrumb > .eyebrow {
    font-size: 8px;
  }
  .project-resources {
    margin-block: 25px;
  }
  .next-project {
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    column-gap: 12px;
  }
  .next-project > .eyebrow {
    grid-column: 1/-1;
    text-align: center;
  }
  .next-project > .arrow {
    grid-column: 3;
    grid-row: 2;
  }
  .next-project > span:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
    font-size: 28px;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 12.35vw;
  }
  .toolkit-grid {
    gap: 10px;
  }
  .project-card h3 {
    font-size: 26px;
  }
  .contact-section h2 {
    font-size: 38px;
  }
  .intro-copy h2 {
    font-size: 37px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 450px;
  }
  .site-header {
    padding-top: 10px;
  }
  .hero-title {
    padding-top: 65px;
  }
}

@media (hover: none) {
  .portrait {
    transform: none;
  }
  .portrait-sheen {
    display: none;
  }
  .project-card:hover .project-art,
  .role-preview:hover h3,
  .education-compact > .education-entry:hover h3 {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal-ready {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee-set[aria-hidden="true"] {
    display: none;
  }
  .portrait {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  .navigation,
  .discover-button,
  .copy-email {
    border: 1px solid ButtonText;
  }
}

.toolkit-logo[data-logo="n8n"] img {
  width: 80%;
  height: auto;
}

.organisation-link {
  display: flex;
  align-items: center;
  gap: 16px;
}

.organisation-link > span:last-child {
  min-width: 0;
}

.organisation-link:hover {
  color: var(--accent);
}

.organisation-logo {
  display: grid;
  place-items: center;
  flex: 0 0 88px;
  width: 88px;
  height: 72px;
}

.organisation-logo img {
  grid-area: 1/1;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.organisation-logo[data-organisation="role-2"] img {
  width: 94px;
  height: 64px;
}

.organisation-logo[data-organisation="role-5"] img {
  width: 82px;
  height: 64px;
}

.organisation-logo[data-organisation="role-0"] img {
  width: 78px;
  height: 64px;
}

.organisation-logo .logo-dark {
  display: none;
}

:root[data-theme="dark"] .organisation-logo:has(.logo-dark) .logo-default {
  display: none;
}

:root[data-theme="dark"] .organisation-logo .logo-dark {
  display: block;
}

@media (max-width: 800px) {
  .organisation-link {
    gap: 12px;
  }
  .organisation-logo {
    flex-basis: 76px;
    width: 76px;
    height: 64px;
  }
  .organisation-logo img {
    max-width: 100%;
    height: 56px;
  }
  .organisation-logo[data-organisation="role-2"] img {
    width: 81px;
    max-width: none;
  }
  .organisation-logo[data-organisation="role-5"] img {
    width: 71px;
  }
}

.experience-record {
  scroll-margin-top: 24px;
}

html:has(.experience-record:target, .certificate-card:target) {
  scroll-behavior: auto;
}

:root[data-theme="light"] .hero {
  background: var(--paper);

  --photo-fade: linear-gradient(
    180deg,
    #000 82%,
    #000000fc 84.25%,
    #000000ed 86.5%,
    #000000cf 88.75%,
    #0000009b 91%,
    #00000064 93.25%,
    #00000030 95.5%,
    #0000000b 97.75%,
    #0000 100%
  );
}

:root[data-theme="light"] .hero-image,
:root[data-theme="light"] .hero-shade {
  -webkit-mask-image: var(--photo-fade);

  mask-image: var(--photo-fade);
}

:root[data-theme="light"] .hero::after {
  background: none;
  pointer-events: none;
}

@media (max-width: 600px) {
  :root[data-theme="light"] .hero {
    --photo-fade: linear-gradient(
      180deg,
      #000 83%,
      #000000fc 85.125%,
      #000000ed 87.25%,
      #000000cf 89.375%,
      #0000009b 91.5%,
      #00000064 93.625%,
      #00000030 95.75%,
      #0000000b 97.875%,
      #0000 100%
    );
  }
}

/* Hide the selector at the same breakpoint where the header becomes two rows. */

@media (max-width: 800px) {
  .site-header .navigation {
    display: none;
  }
}

@media (max-width: 600px) {
  .intro-copy > .portrait-wrap {
    width: min(85%, 300px);
    margin: 0 auto 30px;
  }

  .about-detail-photo {
    order: -1;
    align-self: center;
    width: min(85%, 310px);
    margin: 0;
  }
}

.placeholder-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 11px var(--sans);
  border-radius: 28px;
  padding: 14px 22px;
}
.project-actions {
  margin-top: 20px;
}
.achievement-row {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}
.achievement-row h2 {
  font-size: 34px;
  margin: 10px 0;
}
.about-toolkit-link {
  flex-wrap: wrap;
}
.project-card .project-status {
  display: block;
}
.contact-email > a:hover {
  color: var(--ink);
}

.copy-idle .copy-icon {
  width: 16px;
  height: 16px;
  flex: none;
}
:root[data-theme="light"] .copy-email {
  background: #203a55;
  color: #ffffff;
}
:root[data-theme="light"] .copy-email svg {
  color: inherit;
  stroke: currentColor;
}
.creation-flow {
  width: min(100%, 300px);
  margin-top: 20px;
  color: var(--accent);
}
.creation-flow svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.flow-rail {
  stroke: var(--line);
  stroke-width: 1;
}
.flow-thread {
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 0.09 0.91;
  animation: connection-flow 4.5s linear infinite;
  animation-play-state: paused;
}
.flow-thread.second {
  animation-duration: 5.5s;
  animation-delay: -2.25s;
  animation-direction: reverse;
  opacity: 0.7;
}
.flow-nodes {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 1;
}
.flow-seed {
  fill: var(--accent);
  transform-origin: 178px 38px;
  animation: connection-breathe 4.5s ease-in-out infinite;
  animation-play-state: paused;
}
.flow-labels {
  fill: var(--muted);
  font: 9px var(--sans);
  letter-spacing: 0.08em;
}
.creation-flow.is-active .flow-thread,
.creation-flow.is-active .flow-seed {
  animation-play-state: running;
}
@keyframes connection-flow {
  to {
    stroke-dashoffset: -1;
  }
}
@keyframes connection-breathe {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-thread {
    animation: none;
    stroke-dasharray: none;
    opacity: 0.25;
  }
  .flow-seed {
    animation: none;
  }
}

/* Homepage only: tool logos travel along two open ribbons as the page scrolls. */
.ribbon-toolkit {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 36px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 55px 0 15px;
}
.ribbon-toolkit-intro h2 {
  font-size: clamp(36px, 3.4vw, 50px);
  margin: 20px 0 30px;
}
.tool-ribbons {
  position: relative;
  min-width: 0;
  aspect-ratio: 800/380;
}
.tool-ribbon-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.tool-ribbon-rail {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.tool-ribbon-rail.second {
  stroke-dasharray: 2 6;
}
.tool-ribbon-trace {
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-dasharray: 0.12 0.88;
  stroke-dashoffset: calc(var(--ribbon-progress, 0.5) * -1);
  vector-effect: non-scaling-stroke;
}
.tool-ribbon-trace.second {
  opacity: 0.65;
  stroke-dasharray: 0.07 0.93;
  stroke-dashoffset: calc(var(--ribbon-progress, 0.5) * 1);
}
.ribbon-tools {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ribbon-tool {
  position: absolute;
  left: var(--tool-x);
  top: var(--tool-y);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ribbon-tool-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px var(--shadow);
}
.ribbon-tool-icon img {
  width: 32px;
  height: 32px;
  padding: 4px;
  background: #e9f0f7;
  border-radius: 50%;
  object-fit: contain;
}
.ribbon-tool-label {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
  white-space: nowrap;
  background: var(--paper);
  padding-inline: 3px;
}
@media (max-width: 1100px) {
  .ribbon-toolkit {
    grid-template-columns: 1fr 1.65fr;
    gap: 24px;
  }
  .ribbon-tool-icon {
    width: 40px;
    height: 40px;
  }
  .ribbon-tool-icon img {
    width: 28px;
    height: 28px;
  }
}
@media (max-width: 800px) {
  .ribbon-toolkit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding-top: 40px;
  }
  .ribbon-toolkit-intro h2 br {
    display: none;
  }
  .tool-ribbons {
    width: 100%;
    margin-top: 20px;
  }
  .ribbon-toolkit-intro .discover-button {
    margin-bottom: 8px;
  }
}
@media (max-width: 600px) {
  .ribbon-toolkit {
    gap: 16px;
  }
  .ribbon-toolkit-intro h2 {
    font-size: 35px;
  }
  .tool-ribbons {
    margin: 20px 0 30px;
  }
  .ribbon-tool-icon {
    width: 32px;
    height: 32px;
  }
  .ribbon-tool-icon img {
    width: 24px;
    height: 24px;
    padding: 3px;
  }
  .ribbon-tool-label {
    font-size: 8px;
  }
  .ribbon-tool {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tool-ribbon-trace {
    stroke-dashoffset: -0.4;
  }
}

/* Toolkit detail stays steady while scrolling. */
.toolkit-logo {
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .toolkit-item:hover .toolkit-logo {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--shadow);
  }
}

/* Supplied project imagery shares the portfolio card treatment. */
.project-photo { display:block; width:100%; height:auto; aspect-ratio:600/360; object-fit:cover; border-radius:12px; }
.project-screenshot { margin:40px 0; }
.project-screenshot img { display:block; width:100%; height:auto; border-radius:22px; }
.project-screenshot figcaption { color:var(--muted); font-size:13px; margin-top:12px; }
.project-gallery { display:grid; gap:20px; }
.project-gallery .project-screenshot { margin:0 0 30px; }

/* Shared project gallery and certificate grid. */
.project-media { padding:0; isolation:isolate; }
.project-slides { display:flex; transition:transform 420ms var(--ease); }
.project-slide { flex:0 0 100%; min-width:0; }
.project-slide a { display:block; }
.project-slide img { display:block; width:100%; aspect-ratio:600/360; object-fit:cover; height:auto; }
.project-media .project-slides > a { display:block; flex:0 0 100%; padding:12px 15px; }
.project-slide-arrow { position:absolute; top:50%; transform:translateY(-50%); z-index:2; width:38px; height:38px; display:grid; place-items:center; border:1px solid color-mix(in srgb,var(--ink) 25%,transparent); border-radius:50%; color:var(--ink); background:color-mix(in srgb,var(--paper) 72%,transparent); backdrop-filter:blur(10px); cursor:pointer; }
.project-slide-arrow[hidden] { display:none; }
.project-slide-arrow.previous { left:12px; }
.project-slide-arrow.next { right:12px; }
.project-slide-arrow.previous svg { transform:rotate(180deg); }
.project-slide-arrow:hover { background:var(--surface); }
.project-slide-arrow .arrow { width:18px; height:18px; }
.project-slide-count { position:absolute; right:14px; bottom:12px; padding:4px 10px; border-radius:20px; background:color-mix(in srgb,var(--paper) 80%,transparent); color:var(--ink); font-size:11px; }
.project-page > .project-media { margin:36px 0; }
.project-stack-compact { margin:36px 0; }
.project-stack-compact .stack-list { display:flex; flex-wrap:wrap; gap:8px 20px; }
.project-brief { max-width:750px; margin:45px 0; display:grid; gap:24px; }
.project-brief h2 { font-size:28px; margin-bottom:12px; }
.project-brief p { color:var(--muted); line-height:1.8; }
.certificate-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:52px 28px; }
.certificate-card { min-width:0; scroll-margin-top:24px; }
.marquee-certificate { display:block; flex:none; border-radius:14px; cursor:grab; }
.marquee-certificate img { display:block; }
.marquee.is-dragging .marquee-certificate { cursor:grabbing; }
.certificate-card > img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:contain; border-radius:22px; background:var(--surface); margin-bottom:24px; }
.certificate-card > img[data-orientation="landscape"] { object-fit:cover; }
.certificate-card .certificate-description { margin-top:12px; line-height:1.8; }
.certificate-card h2 { font-size:clamp(24px,3vw,34px); line-height:1.2; margin:12px 0; }
.certificate-card p:not(.eyebrow), .certificate-card .pending { color:var(--muted); font-size:14px; }
.certificate-card .pending { display:block; margin-top:14px; }
@media(max-width:600px) { .certificate-grid { grid-template-columns:1fr; gap:38px; } }
@media(prefers-reduced-motion:reduce) { .project-slides { transition:none; } }

/* Smooth fractional-pixel certificate movement; vertical touch scrolling stays native. */
.marquee-enhanced { overflow:hidden; touch-action:pan-y; scroll-behavior:auto; }
.marquee-enhanced .marquee-track { backface-visibility:hidden; }
@media (prefers-reduced-motion:reduce) {
  .hero-title { transition:none; opacity:1; }
  .booting .hero-title { opacity:1; }
}

/* Balanced desktop toolkit; on mobile its action follows the ribbon animation. */
.ribbon-toolkit { row-gap:0; }
.ribbon-toolkit-intro { grid-column:1; grid-row:1; align-self:end; }
.ribbon-toolkit > .tool-ribbons { grid-column:2; grid-row:1 / span 2; }
.ribbon-toolkit > .discover-button { grid-column:1; grid-row:2; justify-self:start; align-self:start; }
html, body { overscroll-behavior-y:none; }
@media (max-width:800px) {
  .ribbon-toolkit { gap:22px; }
  .ribbon-toolkit-intro { align-self:stretch; }
  .ribbon-toolkit > .discover-button { align-self:flex-start; }
}

/* Experience identities: transparent artwork, with explicit theme variants. */
.experience-identity { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.experience-record .experience-identity h2 { margin: 0; min-width: 0; }
.experience-logo { flex: 0 0 88px; width: 88px; height: 68px; display: grid; place-items: center; }
.experience-logo img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.experience-logo .organisation-logo-light { display: none; }
:root[data-theme="light"] .experience-logo .organisation-logo-light { display: block; }
:root[data-theme="light"] .experience-logo .organisation-logo-dark { display: none; }
@media (max-width: 800px) {
  .experience-identity { gap: 14px; margin-bottom: 24px; }
  .experience-logo { flex-basis: 72px; width: 72px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee.marquee-enhanced { overflow-x: auto; touch-action: auto; }
  .marquee-enhanced .marquee-track { transform: none !important; }
  .marquee-enhanced .marquee-set[aria-hidden="true"] { display: none; }
}
