@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Lets the monogram ring rotate smoothly. */
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  /* colour: the hub is monochrome; each build brings its own colour to its own section */
  --bg: #0a0a0b;
  --bg-2: #0e0e10;
  --surface: #141416;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.15);
  --text: #ededef;
  --muted: #a1a1a8;   /* 7.7:1 on --bg */
  --soft: #7b7b83;    /* large display text only, 4.6:1 */
  --live: #4ade80;
  --c-b2b: #2dd4bf;
  --c-salon: #d08ba3;
  --c-shop: #7d8fff;
  --c-lamp: #f3dfb8;
  --spectrum: conic-gradient(from var(--angle), var(--c-b2b), var(--c-salon), var(--c-shop), var(--c-lamp), var(--c-b2b));

  /* type */
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-h2: clamp(2.25rem, 1.2rem + 4.4vw, 5rem);
  --fs-h3: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem);

  /* layout */
  --gutter: clamp(1.25rem, 4.5vw, 3.5rem);
  --max: 1280px;
  --gap: clamp(1rem, 2.4vw, 2rem);
  --header-h: 64px;
  --radius: 16px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; color: var(--text); }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.soft { color: var(--soft); }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 8px; }
.skip { position: fixed; z-index: 100; left: 12px; top: -80px; padding: 0.75rem 1rem; border-radius: 10px; background: #fff; color: #000; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* scroll progress: the only place all four project colours meet in a line */
.progress { position: fixed; z-index: 70; inset: 0 0 auto; height: 2px; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--c-b2b), var(--c-salon), var(--c-shop), var(--c-lamp)); display: none; }
@supports (animation-timeline: scroll()) {
  .progress { display: block; animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* header */
.site-header { position: fixed; z-index: 50; inset: 0 0 auto; height: var(--header-h); display: flex; align-items: center; gap: 1rem; padding: 0 var(--gutter); background: rgb(10 10 11 / 0.7); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; min-width: 44px; margin-right: auto; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }

/* monogram: a serif "ys" inside a slowly turning ring of the four build colours */
.mark { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 1.5px; border-radius: 12px; background: var(--spectrum); animation: turn 9s linear infinite; box-shadow: 0 0 22px -6px rgb(125 143 255 / 0.55); }
.mark-inner { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 10.5px; background: radial-gradient(120% 120% at 30% 15%, #26262b, #0b0b0d 60%); color: #fff; font: italic 400 1.3rem/1 var(--serif); letter-spacing: -0.02em; padding: 0 0 3px 1px; transition: transform 0.5s var(--ease); }
.brand:hover .mark { animation-duration: 2.5s; }
.brand:hover .mark-inner { transform: scale(0.94); }
@keyframes turn { to { --angle: 360deg; } }

.site-header nav ul { display: flex; gap: 0.25rem; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; color: var(--muted); font-size: 0.9375rem; text-decoration: none; transition: color 0.2s; }
.site-header nav a:hover { color: var(--text); }
.header-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: transform 0.3s var(--ease), background 0.3s; }
.header-cta:hover { background: #fff; transform: translateY(-1px); }
@media (max-width: 760px) { .site-header nav { display: none; } }
@media (max-width: 420px) { .brand-name { display: none; } }

/* hero */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--header-h) + clamp(2.5rem, 8vh, 6rem)) 0 clamp(2.5rem, 7vh, 5rem); overflow: hidden; }
.hero-field { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgb(255 255 255 / 0.1) 1px, transparent 1.5px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(90% 60% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(90% 60% at 50% 30%, #000 20%, transparent 75%); }
.hero-field::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.7) 1px, transparent 1.6px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(240px circle at var(--mx, 50%) var(--my, 40%), #000, transparent 75%); mask-image: radial-gradient(240px circle at var(--mx, 50%) var(--my, 40%), #000, transparent 75%);
  opacity: var(--spot, 0); transition: opacity 0.5s var(--ease); }
.hero-field::after { content: ""; position: absolute; inset: auto -10% -30% -10%; height: 70%; background: radial-gradient(50% 60% at 50% 100%, rgb(255 255 255 / 0.07), transparent 70%); }
.hero-inner { display: grid; gap: clamp(1.5rem, 4vh, 2.75rem); }
.kicker { color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; }

.name { display: grid; font-size: clamp(3.9rem, 19.5vw, 14rem); font-weight: 640; line-height: 0.84; letter-spacing: -0.043em; margin-left: -0.04em; }
.name-line { display: block; white-space: nowrap; padding-bottom: 0.06em; clip-path: inset(-0.1em -0.2em -0.12em -0.1em); }
.name-line + .name-line { color: var(--soft); }
.ch { display: inline-block; font-variation-settings: "wght" var(--w, 640); will-change: font-variation-settings; }
.js-intro .name-line:not(.is-split) { opacity: 0; }
.js-intro .ch { transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms + 120ms); }
@keyframes rise { to { transform: none; } }

.hero-foot { display: grid; gap: 2rem; padding-top: clamp(1.25rem, 3vh, 2rem); border-top: 1px solid var(--line); }
.lede { max-width: 34rem; color: var(--muted); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); line-height: 1.5; }
.toc { display: grid; align-content: start; }
.toc a { display: grid; grid-template-columns: 2.5rem 1fr auto 1.5rem; align-items: center; gap: 0.5rem; min-height: 48px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); transition: padding 0.35s var(--ease); }
.toc li:first-child a { border-top: 1px solid var(--line); }
.toc .mono { font-size: 0.8125rem; color: var(--soft); }
.toc-type { color: var(--muted); font-size: 0.875rem; }
.toc-dot { justify-self: end; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line-2); transition: background 0.25s, border-color 0.25s, transform 0.35s var(--ease); }
.toc a:hover, .toc a:focus-visible { padding-left: 0.5rem; }
.toc a:hover .toc-dot, .toc a:focus-visible .toc-dot { background: var(--c); border-color: var(--c); transform: scale(1.4); }
@media (max-width: 420px) { .toc-type { display: none; } }
@media (min-width: 900px) { .hero-foot { grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); } }

/* sections */
section { position: relative; }
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: var(--fs-h2); font-weight: 620; line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
.section-sub { max-width: 38rem; color: var(--muted); font-size: 1.125rem; }
.work, .how, .skills, .contact { padding-block: clamp(5rem, 12vw, 10rem); }
.how, .contact { background: var(--bg-2); border-block: 1px solid var(--line); }

/* case studies */
.case { padding-block: clamp(3.5rem, 9vw, 7.5rem); border-top: 1px solid var(--line); }
.case-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 1000px) {
  .case-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .case--flip .case-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .case--flip .preview { order: 2; }
}

.preview { position: relative; display: block; text-decoration: none; }
.preview::before { content: ""; position: absolute; inset: 8% 4% -6%; z-index: -1; border-radius: 40px; background: radial-gradient(60% 60% at 50% 55%, var(--c), transparent 70%); opacity: 0.16; filter: blur(40px); transition: opacity 0.6s var(--ease); }
.case:hover .preview::before { opacity: 0.28; }
.browser { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 40px 80px -30px rgb(0 0 0 / 0.8); transition: transform 0.7s var(--ease); }
.case:hover .browser { transform: translateY(-6px); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 0.14); }
.url { margin-inline: auto; padding: 3px 12px; border-radius: 6px; background: rgb(255 255 255 / 0.05); color: var(--muted); font-size: 0.6875rem; transform: translateX(-17px); }
.frame { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 0.04) 50%, transparent 70%) 0 0 / 250% 100%, radial-gradient(70% 80% at 50% 40%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%), var(--bg-2); animation: shimmer 1.8s linear infinite; }
.frame.is-loaded { animation: none; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.frame:has(.poster) { animation: none; }
@keyframes shimmer { to { background-position: -250% 0, 0 0, 0 0; } }
.frame iframe { position: absolute; top: 0; left: 0; border: 0; transform: scale(var(--s, 0.3)); transform-origin: 0 0; opacity: 0; transition: opacity 0.6s var(--ease); background: transparent; }
.frame.is-loaded iframe { opacity: 1; }
.phone { position: absolute; right: -3%; bottom: -9%; width: 23%; padding: 5px; border-radius: 26px; background: #050506; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9); transition: transform 0.7s var(--ease) 0.05s; display: none; }
.phone .frame { aspect-ratio: 390 / 844; border-radius: 21px; }
.case--flip .phone { right: auto; left: -3%; }
.case:hover .phone { transform: translateY(-14px); }
@media (min-width: 1000px) { .phone { display: block; } }
/* Small phones: a window onto a scaled desktop page is unreadable, so show the build as it looks on a phone. */
@media (max-width: 639px) {
  .browser { display: none; }
  .phone { display: block; position: static; width: min(74%, 290px); margin: 0 auto; }
  .case:hover .phone { transform: none; }
}

.case-copy { display: grid; gap: 1.2rem; align-content: start; }
.case-meta { display: flex; gap: 1rem; color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
.case-meta span:first-child { color: var(--c); }
.case h3 { font-size: var(--fs-h3); font-weight: 620; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.case-desc { color: var(--muted); font-size: 1.15rem; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--line-2); color: #d4d4d8; font-size: 0.875rem; }
.tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.btn { justify-self: start; display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; margin-top: 0.4rem; padding: 0 1.4rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); font-weight: 600; text-decoration: none; transition: background 0.3s var(--ease), color 0.3s, border-color 0.3s; }
.btn svg { width: 15px; height: 15px; transition: transform 0.35s var(--ease); }
.btn:hover { background: var(--c); border-color: var(--c); color: #0a0a0b; }
.btn:hover svg { transform: translate(2px, -2px); }

/* "on the bench" card */
.next { position: relative; display: grid; gap: 0.75rem; margin-top: clamp(1rem, 4vw, 3rem); padding: clamp(1.75rem, 4vw, 3rem); padding-right: clamp(5rem, 10vw, 8rem); border-radius: calc(var(--radius) + 8px); border: 1px dashed rgb(255 255 255 / 0.22); text-decoration: none; overflow: hidden; isolation: isolate; transition: border-color 0.4s; }
.next::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: radial-gradient(50% 120% at 100% 50%, rgb(255 255 255 / 0.06), transparent 70%); opacity: 0; transition: opacity 0.4s; }
.next:hover { border-color: rgb(255 255 255 / 0.45); }
.next:hover::before { opacity: 1; }
.next-meta { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
.next-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--spectrum); animation: turn 6s linear infinite; }
.next-title { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); font-weight: 620; letter-spacing: -0.035em; line-height: 1.1; }
.next-sub { max-width: 36rem; color: var(--muted); font-size: 1.05rem; }
.next-arrow { position: absolute; right: clamp(1.5rem, 4vw, 3rem); top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; border: 1px solid var(--line-2); transition: background 0.35s, color 0.35s, transform 0.5s var(--ease); }
.next-arrow svg { width: 18px; height: 18px; }
.next:hover .next-arrow { background: var(--text); color: var(--bg); transform: translateX(4px); }

/* how I build */
.principles { display: grid; gap: 0 var(--gap); }
@media (min-width: 640px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principles li { display: grid; align-content: start; gap: 0.7rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line-2); }
.p-num { color: var(--soft); font-size: 0.75rem; }
.principles h3 { font-size: 1.3rem; font-weight: 620; letter-spacing: -0.02em; line-height: 1.2; }
.principles p { color: var(--muted); font-size: 1rem; }

/* skills */
.skills-grid { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
.skills-col { padding-top: 1.25rem; border-top: 1px solid var(--line-2); }
.skills-col h3 { margin-bottom: 1rem; color: var(--soft); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.skills-col li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; }

/* contact */
.contact-inner { display: grid; gap: 1.5rem; }
.contact-card { position: relative; display: grid; gap: 0.35rem; margin-top: 1rem; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: calc(var(--radius) + 8px); border: 1px solid var(--line-2); background: radial-gradient(70% 120% at 0% 0%, rgb(255 255 255 / 0.05), transparent 60%), var(--bg); overflow: hidden; isolation: isolate; }
.contact-card::after { content: ""; position: absolute; inset: auto -20% -60% auto; z-index: -1; width: 60%; aspect-ratio: 1; border-radius: 50%; background: var(--spectrum); filter: blur(90px); opacity: 0.14; animation: turn 14s linear infinite; }
.contact-name { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 620; letter-spacing: -0.03em; }
.contact-role { color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.25rem; }
.email { display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(0.95rem, 4.1vw, 2.6rem); font-weight: 560; letter-spacing: -0.03em; text-decoration: none; overflow-wrap: anywhere; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.5s var(--ease); }
.email:hover { background-size: 100% 1.5px; }
.copy { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 0.875rem/1 var(--sans); cursor: pointer; transition: background 0.25s, color 0.25s; }
.copy svg { width: 15px; height: 15px; }
.copy:hover { background: var(--text); color: var(--bg); }
.copy-status { min-height: 1.4em; color: var(--live); font-size: 0.9rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.contact-links a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 1.3rem; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; text-decoration: none; transition: background 0.3s, color 0.3s; }
.contact-links a svg { width: 14px; height: 14px; }
.contact-links li:first-child a { background: var(--text); color: var(--bg); border-color: var(--text); }
.contact-links a:hover { background: #fff; color: var(--bg); }

/* footer */
.site-footer { padding: 2rem 0 max(2rem, env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 2rem; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.8125rem; text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* reveal on scroll (JS adds .js; without it everything is visible) */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js-intro .ch { animation: none; transform: none; }
  .mark, .next-dot, .contact-card::after, .frame { animation: none; }
  .browser, .phone, .btn, .btn svg, .toc a, .toc-dot, .next-arrow, .mark-inner { transition: none; }
  .case:hover .browser, .case:hover .phone { transform: none; }
}
