:root {
  color-scheme: dark;
  --background: #0B0B0C;
  --surface: #161618;
  --surface-raised: #1C1C1F;
  --text: #A1A1A6;
  --bright: #F5F5F7;
  --muted: #8E8E93;
  --rule: #232326;
  --profile-red: #D65258;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; margin: 0; background: var(--background); color: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }
a:hover { color: var(--bright); }
.portfolio { width: min(768px, calc(100% - 48px)); margin: 0 auto; padding: 82px 0 100px; }
.intro-id { display: flex; align-items: center; gap: 16px; }
.profile-image { display: block; width: 64px; height: 64px; flex: none; margin: 0; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / 8%); }
.intro { position: relative; max-width: none; }
.intro > * { position: relative; z-index: 1; }
.hello { margin: 0 0 3px; color: var(--bright); font-size: 20px; font-weight: 600; letter-spacing: -.035em; }
.role { margin: 0; color: var(--muted); font-size: 14px; }
.intro-copy { max-width: none; margin: 28px 0 0; color: var(--text); font-size: 15px; font-weight: 400; line-height: 1.85; }
.intro-copy-2 { margin-top: 16px; }
.company-mention { position: relative; display: inline; margin: 0; padding: 0; border: 0; border-bottom: 1px dotted #5A5A5F; background: none; color: var(--bright); font: inherit; line-height: inherit; cursor: pointer; }
.company-mention:hover { color: #fff; }
.company-mention:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; border-radius: 2px; }
.logo-popover { position: absolute; z-index: 3; left: 50%; bottom: calc(100% + 12px); display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border: 1px solid #2C2C30; border-radius: 12px; background: var(--surface-raised); box-shadow: 0 12px 30px rgb(0 0 0 / 50%); color: var(--bright); font-size: 12px; font-weight: 400; line-height: 1.3; text-align: left; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(calc(-50% + var(--pop-shift, 0px)), 5px) scale(.96); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.logo-popover::after { position: absolute; top: 100%; left: calc(50% - var(--pop-shift, 0px)); width: 9px; height: 9px; border-right: 1px solid #2C2C30; border-bottom: 1px solid #2C2C30; background: var(--surface-raised); content: ""; transform: translate(-50%, -50%) rotate(45deg); }
.pop-logo { display: grid; width: 44px; height: 44px; flex: none; place-items: center; overflow: hidden; padding: 5px; border: 1px solid #2C2C30; border-radius: 9px; background: #fff; }
.pop-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pop-text { display: grid; gap: 2px; }
.pop-role { color: var(--bright); font-size: 13px; font-weight: 500; }
.pop-period { color: var(--muted); font-size: 11.5px; }
.company-mention:hover .logo-popover, .company-mention:focus-visible .logo-popover, .company-mention[aria-expanded="true"] .logo-popover { opacity: 1; visibility: visible; transform: translate(calc(-50% + var(--pop-shift, 0px)), 0) scale(1); }
.intro-links { display: flex; gap: 12px; margin-top: 24px; font-size: 12px; }
.intro-links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 7px; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.intro-links a:hover { border-color: #3A3A3F; background: var(--surface); color: var(--bright); }
.intro-links span { color: var(--muted); }
.section { margin-top: 86px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--bright); font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.heading-icon { width: 14px; height: 14px; flex: none; object-fit: contain; filter: brightness(0) invert(1) opacity(.87); }


@media (max-width: 640px) {
  .portfolio { width: calc(100% - 40px); padding-top: 52px; }
  .intro-copy { margin-top: 24px; font-size: 14px; line-height: 1.8; }
  .section { margin-top: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Entrance animations: intro fades in on load, the rest on scroll */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.intro > * { animation: fade-up .7s cubic-bezier(.2,.7,.2,1) both; }
.intro > :nth-child(1) { animation-delay: .05s; }
.intro > :nth-child(2) { animation-delay: .15s; }
.intro > :nth-child(3) { animation-delay: .22s; }
.intro > :nth-child(4) { animation-delay: .32s; }
.intro > :nth-child(5) { animation-delay: .44s; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--reveal-delay, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .intro > * { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}


/* ===== Projects as a list: hover a row to float its screens, everything else dims ===== */
.plist { display: grid; border-top: 1px solid var(--rule); }
.prow { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 12px; border-bottom: 1px solid var(--rule); color: var(--text); outline: none; cursor: default; transition: opacity .35s ease, background .25s ease; }
a.prow { cursor: pointer; }
.prow:focus-visible { border-radius: 10px; box-shadow: inset 0 0 0 2px var(--bright); }
.prow-logo { width: 48px; height: 48px; flex: none; border-radius: 8px; background: transparent; object-fit: cover; image-rendering: auto; }
.prow-text { display: grid; flex: 1; gap: 3px; min-width: 0; }
.prow-title { color: var(--bright); font-size: 16px; font-weight: 500; letter-spacing: -.015em; }
.prow-desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.prow-meta { flex: none; color: var(--muted); font-size: 12.5px; }
.prow-tag { flex: none; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #333338; border-radius: 50%; color: var(--bright); transition: background .2s ease, border-color .2s ease, transform .3s cubic-bezier(.3,1.5,.5,1); }
.prow-tag svg { width: 15px; height: 15px; }
a.prow:hover .prow-tag { border-color: #55555B; background: var(--surface); transform: translateX(3px); }

/* the dimming: everything except the row you're on fades to 30% */
.intro, .section-heading, .prow, .plist { transition: opacity .35s ease; }
body.is-previewing .intro, body.is-previewing .section-heading, body.is-previewing .prow:not(.is-active), body.is-previewing .psub { opacity: .3; }
body.is-previewing .plist { border-top-color: transparent; }

.preview { position: fixed; z-index: 20; top: 0; left: 0; display: flex; align-items: flex-end; gap: 10px; padding: 14px; border-radius: 22px; background: rgb(28 28 31 / 72%); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 8%); opacity: 0; pointer-events: none; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: opacity .25s ease; will-change: transform; }
.preview.on { opacity: 1; }
.preview img { width: 112px; border-radius: 12px; box-shadow: 0 10px 22px -10px rgb(0 0 0 / 70%); transform: translateY(14px) scale(.96); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease; transition-delay: calc(var(--i) * 60ms); }
.preview img:nth-child(2) { width: 122px; }
.preview.on img { transform: none; opacity: 1; }
.preview.is-web img { width: 300px; border-radius: 8px; }
.preview.is-web img:not(:first-child) { display: none; }

@media (max-width: 640px) {
  .prow { padding: 16px 4px; }
  .prow-meta { display: none; }
  .profile-image { width: 56px; height: 56px; border-radius: 8px; }
}
@media (hover: none) { .preview { display: none; } }

/* Profits row: a button that opens the case-study chooser */
button.prow { width: 100%; border: 0; border-bottom: 1px solid var(--rule); background: none; font: inherit; text-align: left; cursor: pointer; }
.pgroup { border-bottom: 1px solid var(--rule); }
.pgroup > .prow { border-bottom: 0; }
.prow-chev svg { transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.pgroup.is-open .prow-chev svg { transform: rotate(180deg); }
button.prow:hover .prow-tag, .pgroup.is-open .prow-tag { border-color: #55555B; background: var(--surface); }
.psub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2,.8,.2,1); }
.pgroup.is-open .psub { grid-template-rows: 1fr; }
.psub-in { display: grid; gap: 8px; min-height: 0; padding: 0 12px; overflow: hidden; visibility: hidden; transition: visibility 0s .4s, padding .4s ease; }
.pgroup.is-open .psub-in { padding: 2px 12px 18px; visibility: visible; transition: visibility 0s, padding .4s ease; }
.psub-label { margin: 0 0 2px 60px; color: var(--muted); font-size: 12px; font-weight: 500; }
.psub-item { display: flex; align-items: center; gap: 14px; margin-left: 60px; padding: 10px 14px 10px 10px; border: 1px solid var(--rule); border-radius: 12px; background: rgb(255 255 255 / 3%); transition: background .2s ease, border-color .2s ease, transform .3s cubic-bezier(.3,1.4,.5,1); }
.psub-item:hover { border-color: #3A3A3F; background: rgb(255 255 255 / 7%); transform: translateX(2px); }
.psub-item:focus-visible { outline: 2px solid var(--bright); outline-offset: 2px; }
.psub-item img { width: 36px; height: 56px; flex: none; border-radius: 6px; object-fit: cover; object-position: top; box-shadow: 0 0 0 1px rgb(255 255 255 / 10%); }
.psub-item span { display: grid; flex: 1; gap: 2px; min-width: 0; }
.psub-item b { color: var(--bright); font-size: 14.5px; font-weight: 500; letter-spacing: -.01em; }
.psub-item small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.psub-go { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border: 1px solid #333338; border-radius: 50%; color: var(--bright); font-style: normal; }
.psub-go svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .psub-label, .psub-item { margin-left: 0; } .psub-in { padding-inline: 4px; } .pgroup.is-open .psub-in { padding-inline: 4px; } }
