.profile-page { background: #20140f; }
.profile-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 76px; border-bottom: 1px solid #f7e8ce22; }
.profile-nav-actions { display: flex; align-items: center; gap: 9px; }
.profile-action { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 17px; border: 1px solid #f7e8ce8c; border-radius: 100px; color: var(--cream); background: #321f16; font-size: .875rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.profile-action:hover, .profile-action:focus-visible { border-color: var(--cream); background: #533725; }
.profile-action-primary { border-color: var(--cream); color: var(--ink); background: var(--cream); }
.profile-action-primary:hover, .profile-action-primary:focus-visible { border-color: var(--orange); color: var(--ink); background: var(--orange); }
.profile-action:focus-visible { outline-color: var(--orange); }
.brew-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr); align-items: end; gap: 36px; padding-top: clamp(38px, 7vw, 104px); padding-bottom: clamp(28px, 5vw, 65px); }
.brew-intro h1 { margin: 16px 0 14px; font: 400 clamp(86px, 13vw, 190px)/.76 var(--display); letter-spacing: -.093em; }
.brew-intro h1 em { color: var(--profile-accent); }
.profile-experience { margin-top: 22px; color: var(--profile-accent); font-weight: 720; }
.brew-summary h2 { margin-bottom: 8px; font: 400 clamp(25px, 3.05vw, 46px)/1.03 var(--display); letter-spacing: -.045em; }
.brew-summary p { max-width: 42ch; color: var(--mute); line-height: 1.55; }
.brew-summary .profile-action { margin-top: 16px; }

.brew-story { width: min(100% - var(--gutter) * 2, 1350px); margin: 0 auto; position: relative; }
.brew-stage { display: grid; grid-template-columns: minmax(0, .73fr) minmax(0, 1.27fr); grid-template-rows: minmax(0, 1fr) auto 3px; position: relative; height: min(79svh, 680px); min-height: 400px; gap: 0; background: #332017; border: 1px solid #e2a8784c; border-radius: clamp(15px, 2.6vw, 32px); overflow: clip; isolation: isolate; }
.brew-portrait { position: relative; min-width: 0; min-height: 0; }
.brew-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 41%; }
.brew-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #190f0be0, transparent 47%); pointer-events: none; }
.brew-portrait figcaption { position: absolute; z-index: 1; bottom: 22px; left: clamp(13px, 2.6vw, 36px); font: 400 clamp(28px, 5vw, 66px)/.92 var(--display); letter-spacing: -.055em; }
.brew-portrait span { display: block; margin-top: 9px; font: 650 .85rem var(--body); color: #f4ccac; letter-spacing: 0; }
.brew-worktop { min-width: 0; min-height: 0; display: grid; align-items: end; background: radial-gradient(ellipse at 61% 65%, #945c3a, #5a3423 42%, #321f16 75%); }
.brew-scene { display: block; width: 100%; max-height: 100%; }
.brew-cue { grid-column: 1 / -1; background: #2a1a13; padding: 13px clamp(14px, 3vw, 35px); color: #f8dfc5; font-size: .875rem; font-weight: 650; }
.brew-progress { display: none; grid-column: 1 / -1; background: #4b3022; }
.brew-motion .brew-progress { display: block; }
.brew-progress span { display: block; height: 100%; background: var(--profile-accent); transform: scaleX(0); transform-origin: left; }
.brew-sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

.profile-skills { margin-top: clamp(68px, 10vw, 150px); margin-bottom: clamp(65px, 9vw, 130px); }
.profile-skills h2 { margin-bottom: clamp(22px, 5vw, 58px); font: 400 clamp(53px, 8vw, 126px)/.89 var(--display); letter-spacing: -.074em; }
.profile-skills em { color: var(--profile-accent); }
.profile-skills ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; }
.profile-skills li { min-height: 150px; padding: clamp(15px, 2.6vw, 32px); border-top: 1px solid #f5c09f57; background: #2a1b14; border-radius: 0 0 15px 15px; }
.profile-skills h3 { margin-bottom: 9px; font: 400 clamp(24px, 3vw, 41px)/1.03 var(--display); letter-spacing: -.045em; }
.profile-skills p { color: var(--mute); line-height: 1.47; }
.profile-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 25px 16px; padding-block: 28px 40px; border-top: 1px solid #f7e8ce35; color: var(--mute); }
.profile-footer > p { grid-row: 2; font-size: .875rem; }
.profile-pagination { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 2.4vw, 34px); }
.profile-step { min-height: clamp(95px, 12vw, 155px); flex-direction: column; align-items: start; gap: 8px; padding: clamp(14px, 3vw, 36px); border-radius: clamp(15px, 2vw, 28px); text-align: left; }
.profile-step strong { font: 400 clamp(30px, 4.7vw, 65px)/.9 var(--display); letter-spacing: -.06em; }
.profile-team-link { justify-self: end; }

@media (max-width: 760px) {
  .brew-intro { grid-template-columns: 1fr; gap: 22px; }
  .brew-intro h1 { font-size: clamp(79px, 17vw, 128px); }
  .brew-story { width: min(100% - var(--gutter) * 2, 550px); }
  .brew-stage { height: auto; min-height: 0; max-height: min(87svh, 660px); grid-template-columns: 1fr; grid-template-rows: min(29svh, 230px) minmax(0, auto) auto 3px; }
  .brew-portrait figcaption { bottom: 14px; }
  .brew-worktop { aspect-ratio: 640 / 495; }
  .brew-cue { padding-block: 10px; min-height: 40px; }
  .profile-skills ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
}
@media (max-width: 480px) {
  .profile-nav { flex-wrap: wrap; gap: 10px; padding-block: 12px; }
  .profile-nav-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .profile-nav-actions .profile-action { padding-inline: 9px; }
  .profile-footer { grid-template-columns: 1fr; gap: 15px; }
  .profile-footer > p { grid-row: 3; }
  .profile-team-link { justify-self: start; }
}
@media (max-width: 420px) {
  .profile-skills ul { grid-template-columns: 1fr; }
  .profile-skills li { min-height: auto; }
  .brew-cue { font-size: .79rem; }
}

/* The sticky wrapper keeps a fixed viewport height while its contents expand. */
.brew-motion .brew-story { width: 100%; height: 258svh; }
.brew-motion .brew-sticky {
  --frame-inset: 1;
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
}
.brew-motion .brew-stage {
  width: calc(100% - min(var(--gutter) * 2, 200px) * var(--frame-inset));
  height: calc(100svh - min(21svh, 160px) * var(--frame-inset));
  min-height: 0;
  max-height: none;
  border-radius: calc(clamp(15px, 2.6vw, 32px) * var(--frame-inset));
  border-color: rgb(226 168 120 / calc(.32 * var(--frame-inset)));
}
.brew-worktop .brew-scene { min-height: 0; height: 100%; }
.brew-story[data-scene="glaze"] .brew-worktop { background: radial-gradient(ellipse at 61% 61%, #b77b72, #6a3b35 50%, #39231d 78%); }
.brew-story[data-scene="box"] .brew-worktop { background: radial-gradient(ellipse at 65% 65%, #a87553, #6b4630 50%, #352317 77%); }

@media (max-width: 760px) {
  .brew-motion .brew-story { height: 244svh; }
  .brew-motion .brew-stage {
    width: calc(100% - var(--gutter) * 2 * var(--frame-inset));
    height: calc(100svh - min(13svh, 83px) * var(--frame-inset));
    grid-template-rows: 30% minmax(0, 1fr) auto 3px;
  }
  .brew-motion .brew-worktop { aspect-ratio: auto; overflow: clip; }
  .brew-motion .brew-worktop .brew-scene { transform: scale(1.10); }
  .brew-portrait img { object-position: 50% 15%; }
}

@media (max-height: 460px) and (orientation: landscape) {
  .brew-motion .brew-stage { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); grid-template-rows: minmax(0, 1fr) auto 3px; }
}
