/* Portfolio (replica of the old Framer site). Manrope, tight tracking. Regular text by default; weight only where it earns it (see Type weights). */

/* Manrope (SIL Open Font License, see fonts/Manrope-OFL.txt), self-hosted: no third-party requests. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2-variations'), url('fonts/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/manrope-latin-ext-wght-normal.woff2') format('woff2-variations'), url('fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --ink: #171717;
  --ink-60: rgba(23, 23, 23, 0.6);
  --ink-40: rgba(23, 23, 23, 0.4);
  --blue: #2a29ff;
  --blue-deep: #1d1cd9;
  --green: #9ef34a;
  --mist: #f6f6f6;
  --line: #efefef;
  --dot: #cacaca;
  --white: #ffffff;
  --surface: #ffffff; /* page and the cards that sit inside frames */
  --accent-ink: var(--blue); /* blue used as text or a thin line */
  --clip: #171717;
  --hook: #0d0d0d;
  --empty-grad: linear-gradient(135deg, #e8e8ff, var(--mist));
  --card-shadow: 0 24px 40px -28px rgba(23, 23, 23, 0.45);
  --err: #d13438;
  --err-bg: #fff4f2;
  --dock-bg: rgba(10, 10, 10, 0.6);
  --dock-ring: rgba(255, 255, 255, 0.08);
  --col: 550px;
  --gutter: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.3, 0.5, 1);
  color-scheme: light;
}

/* Dark theme (the default). boot.js sets data-theme before the first paint; the dock button switches it. */
:root[data-theme='dark'] {
  --ink: #f2f2f2;
  --ink-60: rgba(242, 242, 242, 0.6);
  --ink-40: rgba(242, 242, 242, 0.4);
  --mist: #181818;
  --line: #262626;
  --dot: #3d3d3d;
  --surface: #0d0d0d;
  --accent-ink: #8584ff;
  --clip: #2e2e2e;
  --hook: #3a3a3a;
  --empty-grad: linear-gradient(135deg, #1d1c4d, var(--mist));
  --card-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.9);
  --err: #ff7b72;
  --err-bg: #2a1515;
  --dock-bg: rgba(34, 34, 34, 0.68);
  --dock-ring: rgba(255, 255, 255, 0.11);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.3 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}

::selection {
  background: var(--blue);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 12px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 50px;
  background: var(--ink);
  color: var(--surface);
  font-size: 14px;
}

.skip:focus {
  top: 12px;
}

.h-xl {
  font-size: 50px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.h-md {
  font-size: 24px;
  line-height: 1.4;
}

.mute {
  color: var(--ink-60);
}

/* ---------- Badge (lanyard + ID card) ---------- */
.hero {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 0 auto;
}

.badge {
  position: relative;
  padding-top: 80px;
  animation: drop 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
  transform-origin: 50% -160px; /* swings from up on the lanyard */
}

.lanyard {
  position: absolute;
  inset: 0 0 auto;
  height: 100px;
  pointer-events: none;
  z-index: 2;
}

.lanyard span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.lanyard .strap {
  top: -220px;
  width: 53px;
  height: 250px;
  background: var(--blue);
}

.lanyard .clip {
  top: 30px;
  width: 63px;
  height: 44px;
  border-radius: 6px;
  background: var(--clip);
  box-shadow: inset 0 -6px 0 rgba(255, 255, 255, 0.06);
}

.lanyard .hook {
  top: 72px;
  width: 31px;
  height: 28px;
  border-radius: 0 0 4px 4px;
  background: var(--hook);
}

.frame {
  position: relative;
  padding: 41px 9px 0;
  border-radius: 46px;
  background: var(--mist);
}

.slot {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 63px;
  height: 19px;
  margin-left: -31.5px;
  border-radius: 46px;
  background: var(--surface);
}

.id-card {
  padding: 30px 40px 40px;
  border-radius: 36px;
  background: var(--surface);
}

.bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bars i {
  height: 4px;
  border-radius: 50px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}

.bars i:nth-child(-n + 2)::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left;
  animation: fill 0.9s var(--ease-out) both;
  animation-delay: 0.5s;
}

.bars i:nth-child(2)::after {
  animation-delay: 1.15s;
}

.id-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 0 18px;
  align-items: start;
  margin-top: 40px;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--mist);
}

.name {
  font-size: 22px;
  line-height: 26px;
  letter-spacing: -0.04em;
}

.role {
  margin-top: 6px;
  font-size: 14px;
  line-height: 18px;
  color: var(--ink-60);
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  opacity: 0.38;
}

.socials img {
  width: 18px;
  height: 18px;
}

.status {
  display: flex;
  gap: 7px;
  width: 117px;
  font-size: 13px;
  line-height: 15.6px;
  color: var(--ink-60);
}

.status strong {
  font-weight: 600;
  color: var(--ink);
}

.live {
  flex: none;
  position: relative;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--green);
}

.live::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.45;
  animation: ping 2.4s ease-out infinite;
}

.headline {
  margin-top: 36px;
  font-size: 70px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.headline .w {
  display: inline-block;
  animation: rise 0.9s var(--ease-out) both;
  animation-delay: calc(0.35s + var(--i) * 55ms);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 6px 14px 6px 6px;
  border-radius: 50px;
  background: var(--mist);
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.chip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white);
}

.intro {
  max-width: 360px;
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ink-60);
}

/* Inline badges (Workbench → Homepage). Colours come from the dashboard, with a set for each theme. */
.pill {
  display: inline-block;
  padding: 0 0.5em;
  border-radius: 50px;
  background: var(--pb);
  color: var(--pf);
  box-shadow: inset 0 0 0 1.5px var(--pd);
  font-size: 0.94em;
  line-height: 1.6;
  letter-spacing: -0.02em;
  white-space: nowrap;
  vertical-align: 0.04em;
}

[data-theme='dark'] .pill {
  background: var(--db, var(--pb));
  color: var(--df, var(--pf));
  box-shadow: inset 0 0 0 1.5px var(--dd, var(--pd));
}

/* In big type the pill hugs the letters instead of the line */
.headline .pill,
.h-xl .pill,
.h-md .pill {
  padding: 0.06em 0.3em 0.1em;
  font-size: 0.86em;
  line-height: 1;
  letter-spacing: inherit;
  vertical-align: 0.05em;
}

.h-md .pill {
  padding: 0.04em 0.42em 0.08em;
}

.headline .pill {
  box-shadow: inset 0 0 0 0.04em var(--pd);
}

[data-theme='dark'] .headline .pill {
  box-shadow: inset 0 0 0 0.04em var(--dd, var(--pd));
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  margin-top: 40px;
  padding: 3px 3px 3px 28px;
  border-radius: 100px;
  background: var(--blue);
  color: var(--white);
  font-size: 17px;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.cta-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
}

.cta-ico svg {
  width: 18px;
  height: 18px;
}

.loc {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 0 22px 51px;
  font-size: 13px;
  line-height: 18px;
}

.loc-ico {
  width: 13px;
  height: 13px;
  margin-right: 4px;
  color: var(--ink-60);
  stroke-width: 1.6;
}

/* ---------- Section heads ---------- */
.sec-head {
  text-align: center;
}

.sub {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--ink-60);
}

/* ---------- Project cards ---------- */
.work {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 100px auto 0;
}

.cards {
  display: grid;
  gap: 10px;
  margin-top: 50px;
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 550 / 400;
  border-radius: 42px;
  overflow: hidden;
  background: var(--mist);
  isolation: isolate;
}

.card-media {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: var(--mist);
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img.is-empty {
  background: var(--empty-grad);
}

.card-bar {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 8px;
  border-radius: 50px;
  background: var(--surface);
}

.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--blue);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo.is-mono {
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.card-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.card-title {
  font-size: 16px;
  line-height: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-desc {
  font-size: 14px;
  line-height: 18px;
  color: var(--ink-60);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-go {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--mist);
}

.card-go svg {
  width: 18px;
  height: 18px;
}

.empty {
  margin-top: 40px;
  padding: 48px 24px;
  border-radius: 42px;
  background: var(--mist);
  text-align: center;
  color: var(--ink-60);
}

.work-page {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding-top: 110px;
}

/* ---------- Toolkit ---------- */
.toolkit {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 100px auto 0;
}

.tools {
  display: grid;
  gap: 10px;
  margin-top: 50px;
}

.tool {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 80px;
  padding: 14px 26px 14px 18px;
  border-radius: 18px;
  background: var(--blue);
  color: var(--white);
}

.tool-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: var(--white);
}

.tool-ico img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.tool-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tool-name {
  font-size: 16px;
  line-height: 21px;
}

.tool-note {
  font-size: 14px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.75); /* 0.6 in the original; 0.75 passes WCAG AA on the blue */
}

/* ---------- Skillset ---------- */
.skillset {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 100px auto 0;
}

/* Plain labels, not buttons: no hover state, so nothing looks clickable that isn't. */
.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}

.skill {
  padding: 10px 16px;
  border-radius: 50px;
  background: var(--mist);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ---------- Journey ---------- */
.journey {
  width: min(450px, 100% - 2 * 32px);
  margin: 150px auto 0;
}

.years {
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 100%);
  mask-image: linear-gradient(to right, #000 62%, transparent 100%);
}

.yr {
  position: relative;
  flex: none;
  width: 67.5px;
}

.yr.is-now {
  width: 141px;
}

.yr i {
  display: block;
  width: 10px;
  height: 10px;
  margin: 2px 0;
  border-radius: 50%;
  background: var(--dot);
  position: relative;
  z-index: 1;
}

.yr::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.yr.is-now i {
  width: 14px;
  height: 14px;
  margin: 0;
  background: var(--blue);
}

.yr b {
  display: block;
  margin-top: 27px;
  font-weight: 600;
  font-size: 18px;
  line-height: 25px;
  color: var(--ink-60);
}

.yr.is-now b {
  margin-top: 21px;
  font-size: 52px;
  line-height: 52px;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.journey .h-md {
  margin-top: 46px;
}

.jobs {
  margin-top: 30px;
}

.job {
  display: grid;
  grid-template-columns: minmax(0, 176fr) minmax(0, 127fr) minmax(0, 127fr);
  gap: 10px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.job-role {
  font-size: 16px;
  line-height: 21px;
}

.job-org,
.job-when {
  font-size: 14px;
  line-height: 18px;
}

.job-when {
  text-align: right;
  color: var(--ink-60);
  white-space: nowrap;
}

/* ---------- Contact footer ---------- */
.contact-wrap {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 90px auto 0;
  padding-bottom: 100px;
}

.contact-wrap.is-split {
  padding-bottom: 0;
}

/* Project pages: copyright and the coffee line sit under More projects */
.site-foot {
  width: min(var(--col), 100% - 2 * var(--gutter));
  margin: 90px auto 0;
  padding: 30px 0 100px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-foot .copy {
  margin-top: 0;
}

.site-foot .made {
  padding: 8px 0 0;
}

.frame-foot {
  padding: 9px;
}

.foot-card {
  display: grid;
  justify-items: center;
  padding: 60px 30px;
  border-radius: 40px;
  background: var(--surface);
  text-align: center;
}

.foot-sub {
  max-width: 100%;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--ink-60);
  text-wrap: balance;
}

/* Contact form */
.cform,
.cf-done {
  width: 100%;
  margin-top: 36px;
  text-align: left;
}

.cf-field + .cf-field {
  margin-top: 14px;
}

.cf-field label {
  display: block;
  margin: 0 0 8px 4px;
  font-size: 14px;
  line-height: 18px;
}

.cf-req {
  color: var(--accent-ink);
}

.cf-opt {
  color: var(--ink-40);
}

.cf-field input,
.cf-field textarea {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: var(--mist);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  letter-spacing: -0.03em;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s, background 0.2s;
}

.cf-field input {
  height: 56px;
  padding: 0 22px;
  border-radius: 50px;
}

.cf-field textarea {
  min-height: 132px;
  padding: 16px 22px;
  border-radius: 24px;
  line-height: 1.45;
  resize: vertical;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
  color: var(--ink-40);
}

.cf-field input:focus,
.cf-field textarea:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 5px rgba(42, 41, 255, 0.12);
}

.cf-field.has-error input,
.cf-field.has-error textarea {
  background: var(--err-bg);
  box-shadow: inset 0 0 0 2px #e5484d;
}

.cf-err {
  margin: 8px 0 0 4px;
  font-size: 13px;
  line-height: 17px;
  color: var(--err);
}

.cf-send {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 22px;
  border: 0;
  font: inherit;
  font-size: 17px;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.cf-send:disabled {
  cursor: progress;
  opacity: 0.75;
}

.cf-status {
  min-height: 20px;
  margin: 12px 0 0 4px;
  font-size: 13px;
}

.cf-status.is-error {
  color: var(--err);
}

.cf-done {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 24px;
  border-radius: 28px;
  background: var(--mist);
  text-align: center;
  outline: none;
  animation: rise 0.6s var(--ease-out) both;
}

.cf-check {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--green);
  color: #171717;
}

.cf-check svg {
  width: 24px;
  height: 24px;
}

.cf-done-title {
  font-size: 22px;
}

.cf-done-text {
  max-width: 300px;
  color: var(--ink-60);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cf-done-text strong {
  color: var(--ink);
  font-weight: 600;
}

.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.tool-ico b {
  color: var(--blue);
  font-size: 18px;
}

.copy {
  margin-top: 30px;
  font-size: 14px;
  line-height: 18px;
  color: var(--ink-60);
}

.made {
  padding: 26px 0 17px;
  text-align: center;
  font-size: 13px;
  line-height: 16px;
  color: var(--ink-60);
}

/* ---------- Bottom dock ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 7px 7px 7px 13px;
  border-radius: 50px;
  background: var(--dock-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 9px 26.6px rgba(0, 0, 0, 0.26), inset 0 0 0 1px var(--dock-ring);
  transform: translateX(-50%);
  animation: dock-in 0.8s var(--spring) 0.6s both;
}

.dock-home,
.dock-theme {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.dock-home svg,
.dock-theme svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.6;
}

/* Theme switch: sun in dark mode, moon in light mode. Hidden without JavaScript (it couldn't work). */
.dock-theme {
  display: none;
  margin-left: -9px;
}

.js .dock-theme {
  display: grid;
}

.dock-theme svg {
  grid-area: 1 / 1;
  transition: transform 0.55s var(--soft-spring, ease), opacity 0.3s ease;
}

[data-theme='dark'] .dock-theme .i-moon,
:root:not([data-theme='dark']) .dock-theme .i-sun {
  opacity: 0;
  transform: rotate(-80deg) scale(0.4);
}

.dock-contact {
  display: grid;
  place-items: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 50px;
  background: #ffffff;
  color: #171717;
  font-size: 15px;
  line-height: 1;
  transition: background 0.2s, transform 0.25s var(--spring);
}

.dock-link {
  display: grid;
  place-items: center;
  height: 34px;
  margin: 0 -7px;
  padding: 0 13px;
  border-radius: 50px;
  color: var(--white);
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: background 0.2s;
}

/* Where you are: Home on the homepage, Works on the works page and inside a project */
.dock-home[aria-current],
.dock-link[aria-current] {
  background-color: rgba(255, 255, 255, 0.13);
}

.dock :focus-visible {
  outline-color: var(--white);
  border-radius: 50px;
}

/* Back to top: phones only (the dock sits at the top there, so this lives in the thumb zone).
   site.js shows it once you've scrolled about a screen down, and hides it while you're typing. */
.to-top {
  display: none;
}

@media (max-width: 640px) {
  .to-top {
    position: fixed;
    right: 16px;
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
    z-index: 20;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--dock-bg);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 9px 26.6px rgba(0, 0, 0, 0.26), inset 0 0 0 1px var(--dock-ring);
    color: var(--white);
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px) scale(0.86);
    pointer-events: none;
    transition: opacity 0.3s var(--smooth, ease), transform 0.45s var(--spring);
  }

  .to-top svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
  }

  .to-top.is-on {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .to-top:active {
    transform: scale(0.92);
    transition-duration: 0.12s;
  }

  .to-top:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
  }
}

/* Owner preview note */
.preview-pill {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.pp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Project page ---------- */
.frame-project {
  padding-bottom: 9px;
}

.cover {
  aspect-ratio: 532 / 364;
  border-radius: 36px;
  overflow: hidden;
  background: var(--surface);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-empty {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--empty-grad);
}

.info {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 8px 30px 8px 8px;
  border-radius: 41px;
  background: var(--surface);
}

.info-row dt {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  font-size: 14px;
  line-height: 18px;
  color: var(--ink-60);
}

.info-ico {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--mist);
  color: #8a8a8a;
}

.info-ico svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

.info-row dd {
  min-width: 0;
  text-align: right;
  font-size: 16px;
  line-height: 21px;
}

.visit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 56px;
  font-size: 14px;
  transition: color 0.2s;
}

.visit-ico {
  width: 14px;
  height: 14px;
  color: var(--accent-ink);
  transition: transform 0.3s var(--spring);
}

.visit-gap {
  display: block;
  height: 5px;
}

.p-intro {
  width: min(var(--col), 100% - 2 * 24px);
  margin: 80px auto 0;
}

.p-desc {
  margin-top: 30px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-60);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 50px;
  font-size: 14px;
}

.back-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.back-ico svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--spring);
}

/* Rich text from Workbench. Text sits in the 550px column; images break out to 1120px. */
.prose {
  --wide: min(1120px, 100% - 2 * var(--gutter));
  display: grid;
  grid-template-columns: minmax(24px, 1fr) min(var(--col), 100% - 48px) minmax(24px, 1fr);
  margin-top: 70px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-60);
}

.prose > * {
  grid-column: 2;
}

.prose > .media {
  grid-column: 1 / -1;
  justify-self: center;
  width: var(--wide);
  margin: 90px 0;
}

.prose > .media:first-child {
  margin-top: 0;
}

.prose > .media + .media {
  margin-top: -80px;
}

.prose > .media:last-child {
  margin-bottom: 0;
}

.prose figure {
  margin: 0;
}

.prose .media img {
  width: 100%;
  height: auto;
  border-radius: 30px;
  background: var(--line);
}

.prose .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.prose .pair img {
  align-self: stretch;
  height: 100%;
  object-fit: cover;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

.prose h2 {
  margin: 1.6em 0 0;
  font-size: 26px;
  line-height: 1.3;
}

.prose h3 {
  margin: 1.6em 0 0;
  font-size: 22px;
  line-height: 1.3;
}

.prose h4 {
  margin: 1.4em 0 0;
  font-size: 18px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > p,
.prose > ul,
.prose > ol,
.prose > blockquote,
.prose > pre {
  margin-top: 19px;
}

.prose li p {
  margin: 0;
}

.prose blockquote p + p {
  margin-top: 10px;
}

.prose .media + h2,
.prose .media + h3,
.prose .media + p {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

.prose li::marker {
  color: var(--accent-ink);
}

.prose strong,
.prose b {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--blue);
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--mist);
  color: var(--ink);
  font: 500 0.85em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
}

.prose pre {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--mist);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose hr {
  width: 100%;
  height: 1px;
  margin: 50px 0 31px;
  border: 0;
  background: var(--line);
}

.more {
  margin-top: 100px;
}

/* ---------- 404 ---------- */
.nf {
  display: grid;
  justify-items: center;
  width: min(var(--col), 100% - 48px);
  margin: 0 auto;
  padding-top: 18vh;
  text-align: center;
}

.nf-code {
  font-size: 120px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--accent-ink);
}

.nf .h-xl {
  margin-top: 18px;
}

.nf .cta {
  margin-top: 36px;
}

/* ---------- Interaction layer ----------
   Everything animates transform / opacity / colour only, so it stays on the compositor (smooth at 120Hz).
   Hover styles only apply to devices that can really hover, so nothing "sticks" after a tap. */
:root {
  --t-fast: 0.22s;
  --t-med: 0.45s;
  --t-slow: 0.9s;
  --smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --soft-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}

.socials a,
.chip,
.chip img,
.cta,
.cta-ico,
.card,
.card-bar,
.card-img,
.card-go,
.card-go svg,
.tool,
.tool-ico,
.skill,
.job-role,
.job-when,
.dock-home,
.dock-theme,
.dock-link,
.dock-contact,
.visit,
.visit-ico,
.back-ico,
.back-ico svg,
.prose a,
.made span,
.cf-field input,
.cf-field textarea {
  transition-property: transform, opacity, background-color, color, border-color, box-shadow, text-decoration-color;
  transition-duration: var(--t-med);
  transition-timing-function: var(--smooth);
}

.card-img {
  transition-duration: var(--t-slow);
}

.cta-ico,
.card-go svg,
.back-ico svg,
.visit-ico,
.chip img {
  transition-timing-function: var(--soft-spring);
}

.socials a {
  opacity: 0.38;
}

/* Press feedback everywhere (works on touch too) */
.cta:active,
.dock-contact:active,
.dock-link:active,
.dock-home:active,
.dock-theme:active,
.back:active .back-ico,
.chip:active {
  transform: scale(0.96);
  transition-duration: 0.12s;
}

.card:active {
  transform: scale(0.985);
  transition-duration: 0.18s;
}

@media (hover: hover) and (pointer: fine) {
  .socials a:hover {
    opacity: 1;
    transform: translateY(-2px);
  }

  .chip:hover {
    background-color: var(--line);
  }

  .chip:hover img {
    transform: rotate(-12deg) scale(1.06);
  }

  .cta:hover {
    background-color: var(--blue-deep);
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 14px 28px -14px rgba(42, 41, 255, 0.75);
  }

  .cta:hover .cta-ico {
    transform: rotate(45deg);
  }

  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
  }

  .card:hover .card-img {
    transform: scale(1.035);
  }

  .card:hover .card-go {
    background-color: var(--blue);
    color: var(--white);
  }

  .card:hover .card-go svg {
    transform: rotate(45deg);
  }

  .tool:hover {
    background-color: #3736ff;
  }

  .tool:hover .tool-ico {
    transform: rotate(-6deg) scale(1.06);
  }

  /* Skillset: a soft lift and lighter fill, and the other chips ease back so the hovered one gets the spotlight.
     No pointer cursor: they're labels, not buttons. */
  .skill:hover {
    background-color: var(--line);
    box-shadow: inset 0 0 0 1px var(--dot);
    transform: translateY(-2px);
    transition-duration: var(--t-fast);
  }

  .skills:has(.skill:hover) .skill:not(:hover) {
    opacity: 0.5;
  }

  .job:hover .job-role {
    transform: translateX(4px);
  }

  .job:hover .job-when {
    color: var(--ink);
  }

  .dock-home:hover,
  .dock-theme:hover,
  .dock-link:hover {
    background-color: rgba(255, 255, 255, 0.16);
  }

  [data-theme='dark'] .dock-theme:hover .i-sun,
  :root:not([data-theme='dark']) .dock-theme:hover .i-moon {
    transform: rotate(20deg);
  }

  .dock-contact:hover {
    background-color: #ebebeb;
  }

  .visit:hover {
    color: var(--accent-ink);
  }

  .visit:hover .visit-ico {
    transform: translate(2px, -2px);
  }

  .back:hover .back-ico {
    background-color: var(--blue);
    border-color: var(--blue);
    color: var(--white);
  }

  .back:hover .back-ico svg {
    transform: translateX(-3px);
  }

  .prose a:hover {
    color: var(--accent-ink);
  }

  .made:hover span {
    transform: rotate(-14deg) translateY(-2px);
  }

  .cf-field input:hover,
  .cf-field textarea:hover {
    background-color: var(--line);
  }
}

/* Keyboard focus gets the same treatment as hover */
.cta:focus-visible .cta-ico,
.card:focus-visible .card-go svg {
  transform: rotate(45deg);
}

.card:focus-visible .card-go {
  background-color: var(--blue);
  color: var(--white);
}

.card:focus-visible {
  outline-offset: 4px;
  border-radius: 42px;
}

.made span {
  display: inline-block;
}

/* Reveal on scroll: site.js only hides things that start below the fold, then fades them in once. */
.reveal,
.prose > * {
  transition: opacity 0.9s var(--smooth), transform 0.9s var(--smooth);
  transition-delay: var(--rd, 0ms);
}

.pre {
  opacity: 0;
  transform: translateY(26px);
}

/* ---------- Page transitions (Chrome, Edge, Safari 18+; other browsers just navigate) ---------- */
@view-transition {
  navigation: auto;
}

.dock {
  view-transition-name: dock;
}

.preview-pill {
  view-transition-name: preview-pill;
}

::view-transition-old(root) {
  animation: vt-out 0.26s cubic-bezier(0.4, 0, 1, 1) both;
}

::view-transition-new(root) {
  animation: vt-in 0.5s var(--smooth) 0.06s both;
}

::view-transition-group(*) {
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-image-pair(*) {
  isolation: auto;
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Arriving through a page transition: skip the first-visit intro so nothing animates twice. */
.vt .badge,
.vt .headline .w,
.vt .bars i::after,
.vt .dock {
  animation: none !important;
}

/* ---------- Theme switch ----------
   site.js wraps the switch in a view transition: the new theme grows out of the dock button as a circle.
   During it, nothing else animates and everything is captured as one picture. */
html.theming *,
html.theming *::before,
html.theming *::after {
  transition: none !important;
}

html.theming .dock,
html.theming .preview-pill,
html.theming .card-media,
html.theming .cover {
  view-transition-name: none !important;
}

html.theming::view-transition-old(root),
html.theming::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.theming-fade::view-transition-old(root) {
  animation: fade-out 0.3s ease both;
}

html.theming-fade::view-transition-new(root) {
  animation: fade-in 0.3s ease both;
}

[data-theme='dark'] .socials img {
  filter: invert(1);
}

/* ---------- Motion ---------- */
/* Drops in from above, overshoots a touch, then settles with a small damped swing. */
@keyframes drop {
  0% {
    opacity: 0;
    transform: translateY(-90px) rotate(-1deg);
  }
  18% {
    opacity: 1;
  }
  42% {
    transform: translateY(7px) rotate(0.9deg);
  }
  62% {
    transform: translateY(-3px) rotate(-0.5deg);
  }
  80% {
    transform: translateY(1px) rotate(0.2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.32em);
    filter: blur(6px);
  }
}

@keyframes fill {
  from {
    transform: scaleX(0);
  }
}

@keyframes ping {
  0% {
    transform: scale(0.5);
    opacity: 0.5;
  }
  80%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes dock-in {
  from {
    opacity: 0;
    transform: translate(-50%, 24px);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .badge {
    padding-top: 80px;
  }

  .frame {
    border-radius: 40px;
  }

  .id-card {
    padding: 22px 26px 30px;
    border-radius: 32px;
  }

  .id-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0 18px;
    margin-top: 28px;
  }

  .avatar {
    width: 54px;
    height: 54px;
  }

  .status {
    grid-column: 1 / -1;
    grid-row: 1;
    width: auto;
    margin-bottom: 24px;
  }

  .headline {
    margin-top: 28px;
    font-size: clamp(40px, 12.6vw, 52px);
  }

  .chip {
    margin-top: 30px;
  }

  .intro {
    font-size: 16px;
  }

  .cta {
    margin-top: 30px;
  }

  .loc {
    justify-content: center;
    padding-left: 0;
  }

  .h-xl {
    font-size: 40px;
  }

  .work,
  .toolkit,
  .skillset {
    margin-top: 80px;
  }

  .work-page {
    padding-top: 120px;
  }

  .cards,
  .tools,
  .skills {
    margin-top: 36px;
  }

  .skill {
    padding: 9px 14px;
    font-size: 13px;
  }

  .card {
    aspect-ratio: 370 / 280;
    border-radius: 34px;
  }

  .card-bar {
    gap: 12px;
  }

  .tool {
    padding: 14px 16px;
    gap: 16px;
  }

  .journey {
    margin-top: 110px;
    width: calc(100% - 2 * 24px);
  }

  .job {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
    padding: 24px 0;
  }

  .job-role {
    font-size: 15px;
  }

  .job-org,
  .job-when {
    font-size: 13px;
  }

  .foot-card {
    padding: 48px 20px;
  }

  .cform,
  .cf-done {
    margin-top: 28px;
  }

  .cf-send {
    width: 100%;
    justify-content: space-between;
  }

  .contact-wrap {
    margin-top: 70px;
    padding-bottom: 40px;
  }

  .contact-wrap.is-split {
    padding-bottom: 0;
  }

  .site-foot {
    margin-top: 70px;
    padding-bottom: 88px; /* room for the back-to-top button */
  }

  /* Dock moves to the top on phones, like the original. */
  .dock {
    top: max(14px, env(safe-area-inset-top));
    bottom: auto;
    animation-name: dock-in-top;
  }

  .preview-pill {
    top: auto;
    bottom: 14px;
  }

  .info-row {
    min-height: 70px;
    padding-right: 22px;
  }

  .info-ico {
    width: 48px;
    height: 48px;
  }

  .p-intro {
    margin-top: 60px;
  }

  .prose {
    margin-top: 56px;
    font-size: 17px;
  }

  .prose > .media {
    margin: 56px 0;
  }

  .prose > .media + .media {
    margin-top: -46px;
  }

  .prose .pair {
    grid-template-columns: 1fr;
  }

  .prose .media img {
    border-radius: 24px;
  }

  .nf-code {
    font-size: 96px;
  }
}

@keyframes dock-in-top {
  from {
    opacity: 0;
    transform: translate(-50%, -24px);
  }
}

/* ---------- Reduce motion (an OS accessibility setting) ----------
   Reduced motion doesn't mean no motion: keep the gentle fades and colour changes,
   drop the movement (the badge drop, sliding reveals, the card-to-cover morph). */
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .badge,
  .dock,
  .headline .w,
  .cf-done {
    animation-name: fade-in;
  }

  .badge {
    animation-duration: 0.8s;
  }

  .live::after {
    animation: none;
  }

  .pre {
    transform: none;
  }

  .skill:hover {
    transform: none;
  }

  .to-top,
  .to-top.is-on {
    transform: none;
  }

  .card-media,
  .cover {
    view-transition-name: none !important;
  }

  ::view-transition-old(root) {
    animation: fade-out 0.2s ease both;
  }

  ::view-transition-new(root) {
    animation: fade-in 0.35s ease both;
  }
}

/* ---------- Type weights ----------
   Everything reads regular (400). These are the only things that get weight:
   headings and titles, names, buttons and links that act like buttons, small labels,
   the values in a project's info rows, and inline emphasis.
   Kept at the end of the file so it wins over the `font: inherit` resets on buttons. */
.h-xl, .h-md, .headline, .name, .card-title, .tool-name, .job-role, .cf-done-title,
.prose h2, .prose h3, .prose h4, .nf-code,
.cta, .cf-send, .dock-contact, .visit, .back, .skip,
.chip, .pill, .preview-pill, .info-row dd, .yr b,
strong, b, .prose strong, .prose b {
  font-weight: 600;
}
.cf-field label, .skill, .dock-link { font-weight: 500; }
.cf-req, .cf-opt { font-weight: 400; }
.logo.is-mono, .tool-ico b { font-weight: 700; }
