html { overflow-x: clip; }
:root {
  color-scheme: dark;
  --bg: #211e25;
  --text: #f4f1f5;
  --muted: #cdc6d2;
  --ink: #1b171f;
  --accent: #ffa24d;
  --shade: #b8662a;
}
body[data-project="busto"] { --accent: #4fd08a; --shade: #2a8757; }
body[data-project="next-up"] { --accent: #c3adff; --shade: #7f69bd; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  overflow-x: clip;
  color: var(--text);
  font: 400 18px/1.45 Gabarito, system-ui, sans-serif;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: #fff; }
strong, .name { font-weight: 600; }
.muted { color: var(--muted); font-weight: 400; }
:focus-visible { outline: 3px solid #fff; outline-offset: 5px; border-radius: 4px; }

.page {
  max-width: 1180px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 64px);
}
header, footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 32px;
}
.name { font-size: 20px; }

main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px 64px;
  align-items: center;
}
h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(52px, 7vw, 92px);
  line-height: .98;
  letter-spacing: -.03em;
}
#word { color: var(--accent); white-space: nowrap; }
.intro p { margin: 24px 0 36px; font-size: 20px; color: var(--muted); max-width: 24em; }

.keys { display: flex; gap: 16px; padding-bottom: 10px; }
.key {
  height: 104px;
  border: 0;
  border-radius: 20px;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  touch-action: manipulation;
  transition: transform .09s, box-shadow .09s, background-color .25s;
}
.key:focus-visible { border-radius: 20px; }
.key svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.alt { width: 104px; background: #4a4452; color: var(--text); --side: #322d38; }
.tab { width: 168px; background: var(--accent); color: var(--ink); --side: var(--shade); }
.key { box-shadow: 0 10px 0 var(--side); }
.key:hover { transform: translateY(2px); box-shadow: 0 8px 0 var(--side); }
.key:active, .key.down { transform: translateY(8px); box-shadow: 0 2px 0 var(--side); }

.stage { min-width: 0; container-type: inline-size; }

/* Poster panel: same layout for every project. data-devices picks phone,
   desktop or both; everything else comes from the project's accent. */
.panel {
  position: relative; isolation: isolate; height: 380px; border-radius: 24px; overflow: hidden;
  background: var(--accent); color: var(--ink);
  --phone: 196px; --k: 1.2;
}
.panel::after {
  content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -60px; bottom: -180px;
  border-radius: 50%; background: rgba(255,255,255,.22);
}
.info { position: absolute; left: 32px; top: 30px; max-width: 42%; }
.icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; box-shadow: 0 10px 24px -8px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.08); }
.icon.plus { background: var(--ink); color: var(--accent); font-size: 36px; font-weight: 500; }
.title { margin: 16px 0 14px; font-size: clamp(34px, 4vw, 46px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; font-weight: 500; padding: 3px 11px; border-radius: 99px; background: rgba(27,23,31,.12); }

.phone, .desktop {
  position: absolute; rotate: 5deg; background: #0b0a0e;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.14), 0 30px 60px -10px rgba(0,0,0,.55);
}
.phone { width: var(--phone); aspect-ratio: 9 / 19.5; right: 52px; top: 54px; border-radius: calc(var(--phone) * .18); padding: calc(var(--phone) * .036); }
.phone::before { content: ""; position: absolute; z-index: 2; top: calc(var(--phone) * .07); left: 50%; translate: -50% 0; width: 30%; height: calc(var(--phone) * .085); border-radius: 99px; background: #000; }
.screen {
  --bar: calc(var(--phone) * .16);
  position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--phone) * .15);
  background: var(--screen, #1b1b1b); padding-top: var(--bar);
}
/* Status bar: time on the left, signal and battery on the right, level with the camera. */
.screen::before, .screen::after { content: ""; position: absolute; z-index: 1; top: calc(var(--phone) * .035); height: calc(var(--phone) * .085); }
.screen::before {
  content: "9:41"; left: 11%; color: #fff; font-weight: 600;
  font-size: calc(var(--phone) * .062); line-height: calc(var(--phone) * .085);
}
.screen::after {
  right: 9%; width: 24%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 12' fill='%23fff'%3E%3Crect x='0' y='7' width='3' height='4' rx='1'/%3E%3Crect x='4.5' y='5' width='3' height='6' rx='1'/%3E%3Crect x='9' y='3' width='3' height='8' rx='1'/%3E%3Crect x='19' y='2' width='21' height='9' rx='2.5' fill='none' stroke='%23fff' stroke-opacity='.5'/%3E%3Crect x='21' y='4' width='15' height='5' rx='1.2'/%3E%3Crect x='41' y='5' width='1.6' height='3' rx='.8' fill-opacity='.5'/%3E%3C/svg%3E") right center / contain no-repeat;
}
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.desktop { border-radius: 14px; padding: 0 7px 7px; translate: 0 -50%; top: 50%; }
.desktop .bar { height: 24px; display: flex; gap: 6px; align-items: center; padding-left: 6px; }
.desktop .bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3640; }
.desktop img { width: 100%; height: auto; aspect-ratio: 576 / 298; object-fit: cover; display: block; border-radius: 8px; }
/* Device layouts size by panel width (cqw), so desktop and phone views match.
   --k makes them a little bigger on narrow panels. */
.panel .phone, .panel .desktop { right: auto; }
/* Capped so a tilted phone always fits the panel height. */
.panel .phone { --phone: min(calc(var(--pw) * var(--k)), var(--phone-max, 155px)); }
.panel .desktop { width: calc(var(--w) * var(--k)); }
/* Phone only. */
[data-devices="phone"] .phone { --pw: 22cqw; left: 58cqw; top: 50%; translate: 0 -50%; }
/* Desktop only. */
[data-devices="desktop"] .desktop { --w: 45cqw; left: 40cqw; top: 50%; translate: 0 -50%; }
/* Both: one tilted group, centers lined up, phone overlapping the screen's right edge. */
.devices { position: absolute; left: 33cqw; top: 50%; translate: 0 -50%; rotate: 5deg; display: flex; align-items: center; }
.devices .desktop, .devices .phone { position: relative; inset: auto; translate: none; rotate: 0deg; flex: none; }
.devices .desktop { --w: 44cqw; }
.devices .phone { --pw: 17cqw; margin-left: -6cqw; }
.empty {
  height: calc(100% + var(--bar)); margin-top: calc(-1 * var(--bar)); display: grid; place-content: center; gap: 12px; text-align: center; padding: 16px;
  background: linear-gradient(160deg, #3b3157, #241d3a); color: var(--text); font-size: 20px; font-weight: 600; line-height: 1.1;
}
.empty b { margin: 0 auto; width: 52px; height: 52px; border-radius: 15px; border: 2px dashed var(--accent); color: var(--accent); display: grid; place-items: center; font-size: 28px; font-weight: 500; }

@container (max-width: 460px) {
  .panel { --k: 1.32; }
  [data-devices="phone"] .phone { left: 56cqw; }
  .devices { left: 32cqw; }
  [data-devices="desktop"] .desktop { --w: 42cqw; left: 35cqw; }
  .info { left: 22px; top: 22px; }
  .icon { width: 52px; height: 52px; border-radius: 13px; }
  .title { font-size: 32px; margin: 12px 0 10px; }
  .chips { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 24px; padding-top: 18px; }
.go { color: var(--accent); }
.slide .panel { animation: slide .28s ease-out; }
@keyframes slide { from { transform: translateX(var(--from, 28px)); } }

.picks, .links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; color: var(--muted); }
.picks button, .links a { min-height: 44px; display: flex; align-items: center; }
.picks button { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.picks button:hover { color: #fff; }
.picks button[aria-pressed="true"] { color: var(--accent); }

@media (max-width: 860px) {
  main { grid-template-columns: minmax(0, 1fr); align-content: start; }
}
@media (max-width: 480px) {
  .page { padding: 20px; }
  .panel { height: 340px; --phone-max: 137px; }
  .key { height: 88px; }
  .alt { width: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .key { transition: none; }
  .slide .panel { animation: none; }
}

.sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
.tap { display: none; }
@media (hover: none) {
  .press { display: none; }
  .tap { display: inline; }
}
