:root {
  /* Apple-style greys: flat light-grey page, white cards, no gradients */
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --text-strong: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --accent: #1d1d1f;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --peach: #d2d2d7;
  --raspberry: #d2d2d7;
  --apricot: #d2d2d7;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --x: 50vw;
  --y: 30vh;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; /* SF on Apple devices */
  background: var(--bg);
  color: var(--muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { color: var(--text-strong); font-weight: 500; }
::selection { background: var(--accent); color: #fff; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 16px; }

/* ---------- Cursor spotlight and background glows: switched off for the flat grey look ---------- */
.spotlight, .parallax { display: none !important; }
.spotlight {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(200px circle at var(--x) var(--y), rgba(255, 127, 163, 0.3), transparent 70%),
    radial-gradient(600px circle at var(--x) var(--y), rgba(255, 160, 122, 0.27), transparent 70%);
  transition: opacity 0.4s;
}

/* ---------- Parallax background ---------- */
.parallax { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: var(--glow, 1); }
.layer { position: absolute; will-change: transform; }
.grid {
  inset: -50% -10%;
  background-image:
    linear-gradient(rgba(20, 18, 16, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 16, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}
.orb { border-radius: 50%; filter: blur(70px); opacity: 0.8; mix-blend-mode: multiply; } /* overlaps mix like watercolour */
.orb-1 { width: 480px; height: 480px; top: 4%; left: -10%; background: var(--peach); }
.orb-2 { width: 420px; height: 420px; top: 60%; right: -8%; background: var(--raspberry); }
.orb-3 { width: 340px; height: 340px; top: 130%; left: 35%; background: var(--apricot); }
.orb-4 { width: 300px; height: 300px; top: 200%; right: 6%; background: var(--peach); }
.orb-5 { width: 380px; height: 380px; top: 140%; left: -12%; background: var(--raspberry); opacity: 0.5; }
.monogram {
  right: 4%; top: 55%;
  font-size: clamp(14rem, 28vw, 26rem); font-weight: 800; line-height: 1; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(20, 18, 16, 0.06);
  user-select: none;
}

/* ---------- Layout ---------- */
.wrap {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto; padding: 0 48px;
  display: flex; gap: 64px;
}
.side {
  position: sticky; top: 0; height: 100vh;
  width: 48%; padding: 96px 0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.main { width: 52%; padding: 96px 0; }

/* ---------- Left column ---------- */
.name {
  font-size: clamp(2.4rem, 4.2vw, 3.3rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.1;
  color: var(--text-strong);
}
.name a {
  /* A light grey sheen sweeps across the name now and then */
  background: linear-gradient(110deg, var(--text-strong) 38%, #c7c7cc 47%, #ececf0 50%, #c7c7cc 53%, var(--text-strong) 62%);
  background-size: 250% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out -3.2s infinite; /* negative delay: first sweep lands just after the entrance */
}
@keyframes sheen { 0%, 60% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
.role { margin-top: 12px; font-size: 1.2rem; font-weight: 500; color: var(--text-strong); letter-spacing: -0.01em; }
.tagline { margin-top: 16px; max-width: 360px; }
/* Short laptop screens: tighten the sticky column so the menu never meets the social icons */
@media (min-width: 1025px) and (max-height: 820px) {
  .side { padding: 64px 0 48px; }
  .side .nav { margin-top: 40px; }
  .main { padding-top: 64px; } /* keep the About text level with the name */
}

.nav { margin-top: 64px; }
.nav li + li { margin-top: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 16px; padding: 12px 0; }
.nav .line { width: 32px; height: 1px; background: var(--faint); transition: width 0.25s, background 0.25s; }
.nav .label {
  font-size: 0.95rem; font-weight: 500; letter-spacing: -0.01em;
  color: var(--faint); transition: color 0.25s;
}
.nav a:hover .line, .nav a.active .line { width: 64px; background: var(--text-strong); }
.nav a:hover .label, .nav a.active .label { color: var(--text-strong); }

.socials { display: flex; gap: 20px; }
.socials a { display: block; color: var(--muted); transition: color 0.2s, transform 0.2s; }
.socials a:hover { color: var(--text-strong); transform: translateY(-2px); }
.socials svg { width: 24px; height: 24px; display: block; }

/* ---------- Right column ---------- */
.section { margin-bottom: 128px; scroll-margin-top: 96px; }
.section > p + p { margin-top: 16px; }
.mobile-heading { display: none; }

/* Experience / education list with hover cards */
.list { display: flex; flex-direction: column; gap: 12px; }
.item {
  position: relative; display: grid; gap: 16px; padding: 20px; margin: 0 -20px;
  border-radius: 10px; transition: background 0.25s, box-shadow 0.25s;
}
.item { grid-template-columns: 170px 1fr; }
.item::before { display: none; }
.item::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(240px circle at var(--cx, 50%) var(--cy, 50%), rgba(51, 70, 240, 0.55), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.25s;
}
.item:hover { background: var(--card); }
.item:hover::before { opacity: 1; }
.list:hover .item:not(:hover) { opacity: 0.5; }
.item { transition: background 0.25s, box-shadow 0.25s, opacity 0.25s; }

.when { font-size: 0.85rem; font-weight: 500; color: var(--faint); padding-top: 4px; }
.item h4 { color: var(--text-strong); font-weight: 500; font-size: 1rem; line-height: 1.4; }
.co { color: var(--text-strong); }
.item p { margin-top: 8px; font-size: 0.92rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags li {
  font-size: 0.75rem; font-weight: 500; color: var(--muted);
  background: rgba(20, 18, 16, 0.05); padding: 4px 12px; border-radius: 999px;
}

.arrow-link { display: inline-flex; gap: 6px; margin-top: 32px; font-weight: 500; color: var(--text-strong); }
.arrow-link span { display: inline-block; transition: transform 0.2s; }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.arrow-link:hover span { transform: translate(3px, -3px); }


/* ---------- Featured work: Apple-style dark gallery ---------- */
.dark {
  --text-strong: #f5f5f7; --muted: #a1a1a6;
  position: relative; z-index: 2; scroll-margin-top: 0;
  color: var(--muted); background: #1d1d1f; padding: 96px 0 136px;
  border-radius: 40px 40px 0 0; /* rises like a sheet over the light page */
}
.work-inner { max-width: 1280px; margin: 0 auto; padding: 0 48px; counter-reset: project; }
/* Type matches the rest of the page: section label like the nav labels,
   project titles like .role, card text like the Experience items */
.work-title { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--text-strong); margin-bottom: 72px; }
.project + .project { margin-top: 96px; }
.project-title::before { /* 01, 02, 03 kicker in peach */
  counter-increment: project; content: "0" counter(project);
  display: block; margin-bottom: 10px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; color: #86868b;
}
.project-sub { display: block; margin-top: 4px; font-size: 0.92rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.project-title { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.4; color: var(--text-strong); margin-bottom: 24px; }
.track {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 4px; }
/* No card box, border or hover lift: these aren't links, so they shouldn't look tappable */
.slide {
  position: relative; flex: 0 0 78%; margin: 0; scroll-snap-align: start;
  display: flex; flex-direction: column;
}
.slide figcaption { padding: 22px 4px 0; text-align: left; }
.slide h5 { font-size: 1rem; font-weight: 500; line-height: 1.4; color: #f5f5f7; }
.slide figcaption p { margin-top: 8px; font-size: 0.92rem; line-height: 1.65; color: #a1a1a6; }
.slide .fw-media { order: -1; flex: none; aspect-ratio: 4 / 3; border: 0; border-radius: 18px; clip-path: none; -webkit-clip-path: none; }
.project-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; }
.learn-more { color: #f5f5f7; font-weight: 500; }
.learn-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.learn-more span { display: inline-block; transition: transform 0.2s; }
.learn-more:hover span { transform: translateX(3px); }
.car-ctrl { display: flex; align-items: center; gap: 10px; }
.dots { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-radius: 999px; background: #333336; }
.dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #8e8e93; cursor: pointer; transition: width 0.35s cubic-bezier(0.65, 0, 0.35, 1), background 0.35s; }
.dot.active { width: 28px; background: #f5f5f7; }
.car-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: #333336; color: #f5f5f7; font: inherit; font-size: 1.3rem; line-height: 1;
  transition: background 0.2s, opacity 0.2s;
}
.car-btn:hover:not(:disabled) { background: #424245; }
.car-btn:disabled { opacity: 0.4; cursor: default; }
/* Desktop: all three feature cards side by side, image on top (Apple's
   "Developer stories" layout); the carousel controls aren't needed */
@media (min-width: 1025px) {
  .project { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 24px; }
  .project + .project { margin-top: 120px; }
  .project-title { margin-bottom: 28px; }
  .track { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; overflow: visible; border-radius: 0; }
  .project-foot { grid-row: 1; grid-column: 2; margin: 0 0 28px; }
  .slide { flex: none; }
  .slide figcaption { padding-top: 24px; }
  .car-ctrl { display: none; }
}
}
.foot { position: relative; z-index: 2; font-size: 0.85rem; color: var(--faint); }
.foot-inner { max-width: 1280px; margin: 0 auto; padding: 48px; }
.dot:focus-visible, .car-btn:focus-visible, .learn-more:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 2px; }

.fw-media {
  --clip: 0%;
  position: relative; overflow: hidden; border-radius: 8px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  clip-path: inset(var(--clip) round 8px);
  -webkit-clip-path: inset(var(--clip) round 8px);
}
.fw-art {
  --s: 1; --py: 0px;
  position: absolute; inset: -14% 0; /* extra height for inner parallax */
  transform: translate3d(0, var(--py), 0) scale(var(--s));
  transition: filter 0.4s;
}
.has-media { background: #f5f5f7; inset: 0; transform: none; } /* real images: full frame, no parallax crop */
.has-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.fw-link { position: absolute; inset: 0; z-index: 1; cursor: pointer; } /* the whole image opens the project's case study */
.has-media img { animation: drift-right 11s ease-in-out infinite alternate; will-change: transform; }
.has-media img[src*="checkout-tray"] { animation-name: float-up; animation-duration: 9s; animation-delay: -3s; }
.has-media img[src*="checkout-sheet"] { animation-name: push-in; animation-duration: 12s; animation-delay: -6s; transform-origin: 62% 80%; }
/* Very subtle life on the work images: a few percent of motion, slow and out of sync */
@keyframes drift-right { from { transform: scale(1.04) translateX(-1.2%); } to { transform: scale(1.04) translateX(1.2%); } }
@keyframes float-up { from { transform: scale(1.03) translateY(1%); } to { transform: scale(1.03) translateY(-1.2%); } }
@keyframes push-in { from { transform: scale(1); } to { transform: scale(1.05); } }
.a1 { background: #e8e8ed; } 
.a2 { background: #e8e8ed; } 
.a3 { background: #e8e8ed; } 
.a4 { background: #e8e8ed; } 
.ui { /* placeholder phone screen until real images are added */
  position: absolute; left: 50%; top: 24%; width: 40%; aspect-ratio: 9 / 16;
  transform: translateX(-50%); border-radius: 18px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 0 30px 60px -24px rgba(20, 18, 16, 0.45);
}
.ui::before { /* abstract content: heading, price, lines, peach button */
  content: ""; position: absolute; inset: 9% 10%;
  background:
    linear-gradient(rgba(20, 18, 16, 0.8) 0 0) 0 0 / 60% 5% no-repeat,
    linear-gradient(rgba(20, 18, 16, 0.08) 0 0) 0 11% / 100% 34% no-repeat,
    linear-gradient(rgba(20, 18, 16, 0.55) 0 0) 0 51% / 42% 5% no-repeat,
    linear-gradient(rgba(20, 18, 16, 0.14) 0 0) 0 60% / 85% 3.5% no-repeat,
    linear-gradient(rgba(20, 18, 16, 0.1) 0 0) 0 66% / 70% 3.5% no-repeat,
    linear-gradient(#86868b 0 0) 0 78% / 100% 8% no-repeat;
  border-radius: 4px;
}

.foot p + p { margin-top: 6px; }
.foot a { color: var(--text-strong); font-weight: 500; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .project-foot { flex-wrap: wrap; }
}

/* ---------- Hello (cycling greeting) ---------- */
.hello {
  display: flex; align-items: center; gap: 12px; height: 1.8em; margin-bottom: 12px;
  font-size: 1.05rem; line-height: 1.8;
}
/* Each part is a clipped slot: words roll through it and its width eases
   to fit the next word, like Smart Animate / Magic Move */
.hello-word, .hello-where {
  position: relative; display: inline-block; overflow: hidden; white-space: nowrap;
  transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.hello-word { color: var(--text-strong); font-weight: 500; height: 1.8em; }
.hello-where { font-size: 0.8rem; font-weight: 500; color: var(--faint); height: 1.8em; line-height: 1.8em; }
.roll, .roll .ch { display: inline-block; white-space: pre; }

/* ---------- Markets map ---------- */
.map { position: relative; margin-top: 40px; }
.map-dots { display: block; width: 100%; height: auto; }
.map-pins { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pin .halo { display: none; fill: url(#halo); opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
.pin .core, .pin .ring { transform-box: fill-box; transform-origin: center; }
.pin .core { fill: var(--accent); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); pointer-events: none; }
.pin .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; pointer-events: none; }
.pin .hit { fill: transparent; cursor: pointer; }
.pin.active .halo { opacity: 1; }
.pin.active .core { transform: scale(1.4); }
.pin.active .ring { animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.map-tip {
  position: absolute; left: 0; top: 0; translate: -50% calc(-100% - 16px);
  background: var(--text-strong); color: #fff; font-size: 0.75rem; font-weight: 500;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease;
}
.map-tip.on { opacity: 1; }
.markets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.markets button {
  font: inherit; font-size: 0.75rem; font-weight: 500; color: var(--muted);
  background: rgba(20, 18, 16, 0.05); border: 0; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.markets button:hover, .markets button:focus-visible, .markets button.active { background: var(--accent-soft); color: var(--accent); }
.markets button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Entrance (first load) ---------- */
@keyframes intro-rise { from { opacity: 0; translate: 0 24px; filter: blur(6px); } }
@keyframes intro-focus { from { opacity: 0; translate: 0 32px; filter: blur(14px); letter-spacing: -0.005em; } }
@keyframes intro-bloom { from { opacity: 0; scale: 0.6; } }
@keyframes intro-fade { from { opacity: 0; } }
.intro .grid { animation: intro-fade 1.4s ease both; }
.intro .orb { animation: intro-bloom 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.intro .orb-2 { animation-delay: 0.1s; }
.intro .orb-3, .intro .orb-4, .intro .orb-5 { animation-delay: 0.2s; }
.intro .monogram { animation: intro-fade 1.6s ease 0.7s both; }
.intro .spotlight { animation: intro-fade 1.2s ease 0.6s both; }
.intro .hello { animation: intro-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both; }
.intro .name { animation: intro-focus 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.intro .role, .intro .tagline, .intro .nav li, .intro .socials li, .intro #about > p {
  animation: intro-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.intro .role { animation-delay: 0.35s; }
.intro .tagline { animation-delay: 0.45s; }
.intro .nav li:nth-child(1) { animation-delay: 0.55s; }
.intro .nav li:nth-child(2) { animation-delay: 0.61s; }
.intro .nav li:nth-child(3) { animation-delay: 0.67s; }
.intro .nav li:nth-child(4) { animation-delay: 0.73s; }
.intro #about > p:nth-of-type(1) { animation-delay: 0.6s; }
.intro #about > p:nth-of-type(2) { animation-delay: 0.72s; }
.intro .socials li:nth-child(1) { animation-delay: 0.85s; }
.intro .socials li:nth-child(2) { animation-delay: 0.91s; }
.intro #experience .item { animation: intro-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.intro #experience .item:nth-child(1) { animation-delay: 0.85s; }
.intro #experience .item:nth-child(2) { animation-delay: 0.97s; }
.intro #experience .item:nth-child(3) { animation-delay: 1.09s; }
.intro .mobile-heading { animation: intro-fade 0.8s ease 0.5s both; }

/* Reveal on scroll */
.reveal { opacity: var(--ro, 1); translate: 0 var(--ry, 0px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name a { animation: none; }
  .reveal { opacity: 1; translate: none; }
  .layer { transform: none !important; }
  .fw-media { --clip: 0% !important; }
  .fw-art { --s: 1 !important; --py: 0px !important; }
  .dot { transition: none; }
  .has-media img { animation: none; }
  .mobile-heading::after { transition: none; }
  .hello-word, .hello-where { transition: none; }
  .pin.active .ring { animation: none; }
}

/* ---------- Mobile / tablet ---------- */
@media (max-width: 1024px) {
  .wrap { flex-direction: column; gap: 0; padding: 0 24px; }
  .side { position: static; height: auto; width: 100%; padding: 72px 0 24px; gap: 32px; }
  .main { width: 100%; padding-top: 32px; }
  .nav { display: none; }
  .section { margin-bottom: 96px; }
  .mobile-heading {
    display: block; position: sticky; top: 0; z-index: 5;
    margin: 0 -24px 24px; padding: 18px 24px;
    font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-strong);
  }
  .mobile-heading.stuck { backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
  /* No band at rest; once the label sticks to the top it gets a frosted,
     see-through bar in the page colour */
  .mobile-heading::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: color-mix(in srgb, var(--bg) 50%, transparent);
    box-shadow: 0 1px 0 rgba(20, 18, 16, 0.06);
    opacity: 0; transition: opacity 0.35s ease;
  }
  .mobile-heading.stuck::after { opacity: 1; }
  .dark { padding: 0 0 64px; border-radius: 28px 28px 0 0; }
  .dark .mobile-heading { border-radius: 28px 28px 0 0; }
  .work-inner { padding: 0 24px; }
  .work-title { display: none; }
  .foot-inner { padding: 40px 24px; }
  .map-dots { opacity: 0.6; } /* the darker desktop dots read heavier on small screens */
  .dark .mobile-heading::after { background: rgba(29, 29, 31, 0.6); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
  .spotlight { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .mobile-heading { margin: 0 -16px 24px; padding: 18px 16px; }
  .main { padding-bottom: 48px; }
  .main > .section:last-child { margin-bottom: 0; } /* trim the gap above the dark sheet */
  .dark { padding: 0 0 56px; }
  .dark .mobile-heading { padding-top: 24px; }
  .work-inner { padding: 0 16px; }
  .foot-inner { padding: 32px 16px; }
  .slide { flex-basis: 86%; }
  .slide figcaption { padding: 18px 2px 0; }
  .item { grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 12px 0; }
  .item:hover { background: none; box-shadow: none; }
  .item::before { display: none; }
  .list:hover .item:not(:hover) { opacity: 1; }
  .monogram { top: 40%; right: -10%; }
}

/* ---------- Featured work, Apple-style cards (projects with real screens) ----------
   A black card on the dark page: one statement on top, the phone rising from the bottom edge. */
.project.apple .slide.ap { position: relative; display: flex; flex-direction: column; aspect-ratio: 4 / 5; border-radius: 28px; background: #000; overflow: hidden; }
.ap figcaption { padding: clamp(28px, 3vw, 40px) clamp(22px, 2.6vw, 34px) 0; text-align: center; }
.ap h5 { font-size: clamp(0.98rem, 1.2vw, 1.08rem); font-weight: 500; line-height: 1.4; letter-spacing: -0.015em; color: #f5f5f7; }
.ap-media { position: relative; flex: 1; margin-top: clamp(22px, 2.4vw, 32px); }
.ap-media img { position: absolute; left: 50%; top: 0; width: 74%; height: auto; transform: translateX(-50%); }
.ap-media.pair img { width: 100%; top: 6%; }
.ap .fw-link { position: absolute; inset: 0; z-index: 1; }
/* Screens whose action lives at the bottom (a tray, a Pay button): show the phone's lower half,
   fading in from the black so it doesn't start with a hard edge */
.ap-media.low { overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 72px); mask-image: linear-gradient(to bottom, transparent, #000 72px); }
.ap-media img, .ap-media video { display: block; }
.ap-media video { position: absolute; left: 50%; width: 74%; height: auto; transform: translateX(-50%); }
.ap-media.low img, .ap-media.low video { top: auto; bottom: clamp(20px, 2.4vw, 32px); }
@media (max-width: 640px) {
  .project.apple .slide.ap { aspect-ratio: 3 / 4; }
  .ap h5 { font-size: 1rem; }
}

/* Portrait above the greeting: large, black and white, warming to colour on hover */
.portrait {
  display: block; width: 112px; height: 112px; margin-bottom: 28px; border-radius: 50%;
  filter: grayscale(1) contrast(1.15) brightness(1.02);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 18px 40px -12px rgba(0, 0, 0, 0.35);
  transition: filter 0.8s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.portrait:hover { filter: none; transform: scale(1.04); }
.intro .portrait { animation: intro-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both; }
@media (min-width: 1025px) and (max-height: 960px) { .portrait { width: 88px; height: 88px; margin-bottom: 18px; } }
@media (min-width: 1025px) and (max-height: 960px) {
  .side { padding: 56px 0 40px; }
  .side .nav { margin-top: 32px; }
  .nav a { padding: 9px 0; }
}
@media (max-width: 640px) { .portrait { width: 96px; height: 96px; margin-bottom: 22px; } }
@media (prefers-reduced-motion: reduce) { .intro .portrait { animation: none; } }
@media (min-width: 1025px) and (max-height: 740px) {
  .portrait { width: 64px; height: 64px; margin-bottom: 12px; }
  .side { padding: 40px 0 32px; }
  .nav a { padding: 7px 0; }
}

/* Links to case studies inside the Experience text */
.exp-link { color: var(--text-strong); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(0, 0, 0, 0.25); text-underline-offset: 3px; }
.exp-link:hover { text-decoration-color: currentColor; }
