/* Phase 1.5 portfolio: shared studio identity, project-specific presentation. */
.portfolio-stack {
  display: grid;
  gap: 55px;
}
.portfolio-project {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
}
.portfolio-project-heading {
  padding: 29px 35px;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
}
.portfolio-project-heading .eyebrow {
  font-size: 9px;
  display: block;
  margin-bottom: 11px;
}
.portfolio-project-heading h3 {
  margin: 0;
  font-size: 33px;
}
.project-status {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 8px 14px;
  line-height: 1.4;
  max-width: 230px;
  text-align: center;
}
.portfolio-device-stage {
  position: relative;
  display: block;
  padding: 45px 11% 55px 6%;
  min-height: 460px;
  overflow: hidden;
  background: #e9e3da;
}
.tone-forma .portfolio-device-stage,
.tone-forma.preview-stage {
  background: #dbe5d0;
}
.tone-arc .portfolio-device-stage,
.tone-arc.preview-stage {
  background: #26333d;
}
.tone-kinetic .portfolio-device-stage,
.tone-kinetic.preview-stage {
  background: #dce4f5;
}
.portfolio-desktop {
  border: 6px solid #273029;
  border-radius: 13px;
  overflow: hidden;
  width: 90%;
  background: #273029;
  box-shadow: 0 24px 50px #0002;
  transition: transform 0.5s;
}
.capture-bar {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  background: #273029;
  color: #ebede6;
  line-height: 1;
  font-size: 8px;
}
.capture-bar i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a6b09c;
}
.capture-bar > span {
  margin: auto;
}
.portfolio-desktop img {
  width: 100%;
  aspect-ratio: 1.44;
  object-fit: cover;
  object-position: top;
}
.portfolio-phone {
  position: absolute;
  width: 19%;
  right: 6%;
  bottom: 35px;
  border: 6px solid #273029;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 45px #0003;
  background: #273029;
  transform: rotate(5deg);
  transition: transform 0.5s;
}
.portfolio-phone img {
  width: 100%;
  aspect-ratio: 390/844;
  object-fit: cover;
  object-position: top;
}
.portfolio-device-stage:hover .portfolio-desktop {
  transform: translateY(-6px);
}
.portfolio-device-stage:hover .portfolio-phone {
  transform: rotate(1deg) translateY(-6px);
}
.stage-link {
  position: absolute;
  right: 29px;
  top: 20px;
  font-size: 10px;
  color: var(--ink);
  background: #fffdf1e8;
  border-radius: 30px;
  padding: 7px 12px;
}
.portfolio-project-foot {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  padding: 26px 35px;
}
.portfolio-project-foot p {
  font-size: 14px;
  margin-bottom: 8px;
  max-width: 750px;
}
.portfolio-project-foot span {
  font-size: 10px;
  color: var(--muted);
}
.portfolio-project-foot > a {
  white-space: nowrap;
}
.portfolio-directory {
  padding-bottom: 100px;
}
.portfolio-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 35px;
}
.portfolio-index a {
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 30px;
}
.portfolio-index a:hover {
  background: var(--lime);
}
.project-preview {
  padding-bottom: 30px;
}
.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  margin-bottom: 30px;
}
.preview-toolbar h2 {
  font-size: 36px;
  margin: 0;
}
.preview-toolbar .eyebrow {
  margin-bottom: 12px;
}
.device-switch {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 30px;
  flex-shrink: 0;
}
.device-switch button {
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 25px;
  padding: 11px 18px;
  font-size: 11px;
}
.device-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.preview-stage {
  padding: 45px;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: start;
  min-height: 400px;
}
.capture-frame {
  display: block;
  padding: 0;
  border: 6px solid #273029;
  border-radius: 14px;
  overflow: hidden;
  background: #273029;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 20px 35px #0002;
  transition: max-width 0.3s;
}
.capture-frame img {
  width: 100%;
  height: auto;
}
.preview-stage.is-mobile .capture-frame {
  max-width: 350px;
  border-radius: 24px;
}
.preview-stage.is-mobile .capture-bar {
  display: none;
}
.preview-stage.is-mobile {
  padding-block: 35px;
}
.project-preview > .fine-print a {
  text-decoration: underline;
}
.palette-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 25px 0 40px;
}
.palette-row > div > span {
  display: block;
  height: 82px;
  border: 1px solid #19251f15;
  border-radius: 9px;
}
.palette-row strong {
  display: block;
  font-size: 12px;
  margin-top: 12px;
  font-weight: 500;
}
.palette-row code {
  font-size: 10px;
  color: var(--muted);
}
.detail-capture {
  border: 1px solid var(--line);
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  width: 100%;
}
.detail-capture img {
  width: 100%;
  height: auto;
}
.detail-capture > span {
  display: block;
  padding: 15px 20px;
  font-size: 11px;
}
.artwork-figure {
  margin: 0;
}
.artwork-figure img {
  border-radius: 14px;
}
.artwork-figure figcaption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}
.studio-lightbox {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  width: min(1200px, 94vw);
  max-width: 94vw;
  max-height: 92vh;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}
.studio-lightbox::backdrop {
  background: #0e1913cc;
  backdrop-filter: blur(5px);
}
.studio-lightbox header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  background: var(--paper);
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.studio-lightbox header p {
  font-size: 12px;
  margin: 0;
  color: var(--ink);
}
.studio-lightbox header button {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.studio-lightbox > img {
  max-height: 77vh;
  width: 100%;
  object-fit: contain;
  object-position: top;
  background: #e9ede2;
}
.direct-email {
  display: inline-block;
  font-size: clamp(14px, 1.4vw, 19px);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 9px;
  margin-top: 15px;
  overflow-wrap: anywhere;
}
.direct-email span {
  margin-left: 8px;
}
.project-context {
  font-size: 12px;
  background: var(--lime);
  border-radius: 7px;
  padding: 14px 17px;
}
.footer-email {
  font-size: 12px;
  display: block;
  margin-top: 16px;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.header nav {
  gap: 26px;
}
.hero-project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 23px;
}
.hero-project-links a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  font-size: 9px;
  border-radius: 25px;
}
.hero-project-links a:hover {
  background: var(--lime);
}
@media (max-width: 1000px) {
  .portfolio-device-stage {
    min-height: 0;
    padding: 40px 11% 45px 5%;
  }
  .portfolio-phone {
    right: 5%;
    border-width: 5px;
    width: 21%;
  }
  .portfolio-project-heading {
    padding: 23px 25px;
  }
  .portfolio-project-foot {
    padding: 23px 25px;
  }
  .portfolio-project-foot p {
    max-width: 500px;
  }
  .header nav {
    gap: 19px;
  }
}
@media (max-width: 800px) {
  .portfolio-stack {
    gap: 35px;
  }
  .portfolio-project-heading h3 {
    font-size: 27px;
  }
  .project-status {
    font-size: 8px;
    max-width: 190px;
    padding: 7px 10px;
  }
  .portfolio-project-foot {
    align-items: start;
  }
  .portfolio-project-foot p {
    font-size: 12px;
  }
  .portfolio-project-foot span {
    font-size: 9px;
  }
  .portfolio-project-foot > a {
    font-size: 10px;
  }
  .preview-toolbar {
    align-items: start;
  }
  .preview-toolbar h2 {
    font-size: 30px;
  }
  .preview-stage {
    padding: 25px;
    min-height: 0;
  }
  .preview-stage.is-mobile .capture-frame {
    max-width: 300px;
  }
  .footer-email {
    font-size: 10px;
  }
}
@media (max-width: 560px) {
  .header nav {
    gap: 0;
  }
  .portfolio-project {
    border-radius: 14px;
  }
  .portfolio-project-heading {
    display: block;
    padding: 23px 20px;
  }
  .portfolio-project-heading h3 {
    font-size: 29px;
  }
  .project-status {
    display: inline-block;
    text-align: left;
    max-width: none;
    margin-top: 15px;
  }
  .portfolio-device-stage {
    padding: 34px 10% 46px 4%;
  }
  .portfolio-desktop {
    border-width: 3px;
    border-radius: 7px;
    width: 94%;
  }
  .portfolio-phone {
    border-width: 3px;
    border-radius: 12px;
    right: 3%;
    bottom: 25px;
    width: 24%;
  }
  .capture-bar {
    height: 15px;
    font-size: 5px;
    padding-inline: 7px;
    gap: 2px;
  }
  .capture-bar i {
    height: 3px;
    width: 3px;
  }
  .stage-link {
    font-size: 8px;
    top: 9px;
    right: 12px;
    padding: 4px 9px;
  }
  .portfolio-project-foot {
    display: block;
    padding: 22px 20px;
  }
  .portfolio-project-foot .text-link {
    display: inline-block;
    margin-top: 9px;
  }
  .portfolio-project-foot p {
    font-size: 13px;
  }
  .portfolio-project-foot span {
    font-size: 9px;
    line-height: 1.7;
    display: block;
  }
  .preview-toolbar {
    display: block;
  }
  .device-switch {
    width: max-content;
    margin-top: 22px;
  }
  .preview-stage {
    padding: 15px;
  }
  .capture-frame {
    border-width: 3px;
    border-radius: 8px;
  }
  .preview-stage.is-mobile .capture-frame {
    border-width: 5px;
    max-width: 250px;
    border-radius: 18px;
  }
  .preview-stage.is-mobile {
    padding-block: 22px;
  }
  .palette-row {
    gap: 10px;
  }
  .palette-row > div > span {
    height: 65px;
  }
  .studio-lightbox header {
    padding: 13px;
  }
  .studio-lightbox header p {
    font-size: 10px;
    max-width: 240px;
  }
  .studio-lightbox header button {
    font-size: 11px;
  }
  .footer-top {
    flex-wrap: wrap;
  }
  .footer-top > div {
    max-width: 75%;
  }
  .footer-email {
    font-size: 10px;
    max-width: 220px;
  }
  .hero-project-links a {
    font-size: 8px;
  }
  .portfolio-directory {
    padding-bottom: 70px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-desktop,
  .portfolio-phone,
  .capture-frame {
    transition: none;
  }
}

@media (min-width: 561px) and (max-width: 800px) {
  .header {
    position: relative;
    z-index: 10;
  }
  .menu-toggle {
    display: flex;
    gap: 15px;
    align-items: center;
    background: transparent;
    border: 1px solid var(--line);
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 12px;
  }
  .header nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    padding: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 18px 20px #19251f10;
    border-radius: 12px;
    align-items: stretch;
  }
  .header nav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .header nav a {
    padding: 13px;
  }
}
