/* ==========================================================================
   Portfolio page — page-scoped stylesheet
   georgvolmer.com/portfolio · extends the site's base styles
   Brand: coral #F15B4E · dark grey #4D4D4F · greys #999999 / #D2D2D2 / #ECECEB
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', Helvetica, Arial, sans-serif;
  color: #4D4D4F;
  background: #FFFFFF;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #CB3D2D;
  text-decoration: none;
}

a:hover {
  color: #B23225;
  text-decoration: underline;
}

/* ---- Layout helpers ---- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.prose {
  max-width: 760px;
}

/* ---- Type ---- */

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  color: #4D4D4F;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 820px;
  text-wrap: pretty;
}

.hero .subline {
  margin: 0 0 72px;
  font-size: 1.25rem;
  color: #6B6B6D;
  font-weight: 400;
}

.kicker {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CB3D2D;
}

.label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6B6D;
}

.project-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #4D4D4F;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.project-lede {
  margin: 0;
  font-size: 1.125rem;
}

.small-note {
  margin: 0;
  font-size: 0.8125rem;
  color: #6B6B6D;
  line-height: 1.7;
}

/* ---- Sections ---- */

.hero {
  padding-top: 112px;
  padding-bottom: 104px;
}

.project {
  border-top: 1px solid #ECECEB;
}

.project .container {
  padding-top: 104px;
  padding-bottom: 104px;
}

.project--tinted {
  background: #FAFAF9;
}

.project-intro {
  max-width: 760px;
  margin-bottom: 64px;
}

.project-intro--tight {
  margin-bottom: 20px;
}

/* ---- Context box (aside) ---- */

.context-box {
  max-width: 760px;
  margin-top: 0;
  margin-bottom: 64px;
  padding: 20px 16px;
  background: #FAFAF9;
  border: 1px solid #ECECEB;
  border-radius: 10px;
}

.context-box-title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #4D4D4F;
}

.context-box-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #6B6B6D;
}

/* ---- Project cards (top) ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #4D4D4F;
}

.card:hover {
  text-decoration: none;
  color: #4D4D4F;
}

.card-media {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(77, 77, 79, 0.12);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover .card-media {
  box-shadow: 0 16px 40px rgba(77, 77, 79, 0.18);
  transform: translateY(-4px);
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.card-media--genie {
  background: #F7F7F6;
}

.card-media--genie .swatch-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.card-media--genie .swatch-grid {
  width: 50%;
  gap: 3px;
  padding: 3px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(77, 77, 79, 0.10);
}

.card-media--genie .genie-logo {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 4px 0;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CB3D2D;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
}

.tm {
  font-size: 0.55em;
  font-weight: 400;
  vertical-align: super;
  margin-left: 1px;
}

.card-blurb {
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---- Problem → Solution pair ---- */

.pair-wrap {
  position: relative;
  margin-bottom: 72px;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: stretch;
}

.pair-problem {
  background: #F7F7F6;
  border-radius: 12px;
  padding: 36px 36px 40px;
}

.project--tinted .pair-problem {
  background: #F1F1F0;
}

.pair-problem h3 {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B6B6D;
}

.pair-problem p {
  margin: 0;
  color: #4D4D4F;
  line-height: 1.8;
}

.pair-solution {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 36px 36px 40px;
  box-shadow: 0 10px 36px rgba(77, 77, 79, 0.13);
  border-top: 3px solid #F15B4E;
}

.pair-solution h3 {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #CB3D2D;
}

.pair-solution p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.pair-solution .recognition {
  margin-top: 16px;
  font-size: 0.9375rem;
}

.pair-solution .recognition strong {
  color: #CB3D2D;
}

.pair-arrow {
  position: absolute;
  left: 43.5%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F15B4E;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(241, 91, 78, 0.4);
  z-index: 2;
}

.pair-arrow svg {
  width: 20px;
  height: 20px;
}

/* ---- Key decisions ---- */

.decisions-block {
  margin-bottom: 72px;
}

.decisions-block > .label {
  margin-bottom: 28px;
}

.decisions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.decision {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.decision-num {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: #F15B4E;
  letter-spacing: -0.02em;
}

.decision h4 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #4D4D4F;
  line-height: 1.4;
}

.decision p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
}

/* ---- Skills chips ---- */

.skills {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 16px;
  margin-bottom: 88px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid #D2D2D2;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.8125rem;
  color: #4D4D4F;
}

.project--tinted .chip {
  background: #FFFFFF;
}

/* ---- Click-to-load embeds ---- */

.embed-block {
  margin-bottom: 16px;
}

.embed-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(77, 77, 79, 0.16);
}

.embed-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.embed-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(77, 77, 79, 0.16);
  background: #F7F7F6;
}

.embed-frame--dark {
  background: #101010;
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.embed-btn {
  position: absolute;
  left: 33%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #F15B4E;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 16px 32px;
  font-family: 'Plus Jakarta Sans', Helvetica, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
}

.icon-play {
  width: 11px;
  height: 13px;
  flex-shrink: 0;
}

.embed-btn:hover {
  background: #D2402F;
  transform: translate(-50%, -50%) scale(1.04);
}

.embed-btn--low {
  left: 50%;
  top: 78%;
}

.embed-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.embed-meta .small-note {
  max-width: 760px;
}

.embed-meta > a {
  font-size: 0.8125rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-external {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ---- Read the full story (details/summary) ---- */

.story {
  border-top: 1px solid #ECECEB;
  margin-top: 48px;
}

.story summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  font-weight: 700;
  color: #4D4D4F;
  font-size: 1rem;
}

.story summary::-webkit-details-marker {
  display: none;
}

.story summary:hover {
  color: #CB3D2D;
}

.story .chev {
  color: #F15B4E;
  width: 10px;
  height: 12px;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.story[open] .chev {
  transform: rotate(90deg);
}

.story-body {
  max-width: 760px;
  padding: 8px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.story-body p {
  margin: 0;
}

.story-body figure {
  margin: 8px 0;
}

.story-body figure img {
  width: 100%;
  border: 1px solid #ECECEB;
  border-radius: 10px;
  display: block;
}

.story-body figure img.narrow {
  max-width: 480px;
}

.story-body figcaption {
  font-size: 0.8125rem;
  color: #6B6B6D;
  margin-top: 8px;
}

.story-body .aside {
  font-style: italic;
  color: #6B6B6D;
}

.story-body h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #4D4D4F;
}

.story-body ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
}

/* ---- Theme Genie visuals ---- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 88px;
}

.genie-stage {
  position: relative;
  background: #F7F7F6;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(77, 77, 79, 0.12);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  background: #FFFFFF;
  aspect-ratio: 1 / 1;
  max-width: 100%;
}

.genie-stage .swatch-grid {
  width: 62%;
  gap: 5px;
  padding: 5px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(77, 77, 79, 0.10);
}

.swatch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 9px;
  line-height: 1.35;
}

.swatch .name {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #333333;
}

.swatch .hex {
  font-size: 0.625rem;
  color: #666666;
}

.swatch--dark .name {
  color: #FFFFFF;
}

.swatch--dark .hex {
  color: rgba(255, 255, 255, 0.85);
}

.genie-stage .genie-logo {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: 16%;
  height: 16%;
  min-width: 28px;
  min-height: 28px;
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
}

.split-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.split-copy p {
  margin: 0;
  font-size: 1.0625rem;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  background: #F15B4E;
  color: #FFFFFF;
  border-radius: 10px;
  padding: 16px 32px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: #D2402F;
  color: #FFFFFF;
  text-decoration: none;
}

.btn--sm {
  padding: 14px 28px;
  font-size: 1rem;
}

/* ---- Proof quotes ---- */

.quotes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 16px;
}

.quote {
  margin: 0;
  background: #F7F7F6;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quote-mark {
  display: block;
  width: 32px;
  height: 24px;
  color: #F15B4E;
}

.quote blockquote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
}

.quote blockquote strong {
  color: #F15B4E;
  font-weight: 700;
}

.quote figcaption {
  font-size: 0.875rem;
  font-weight: 700;
  color: #6B6B6D;
}

/* ---- Contact ---- */

.contact {
  border-top: 1px solid #ECECEB;
  background: #FAFAF9;
}

.contact .container {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.contact img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
  border: 4px solid #FFFFFF;
  box-shadow: 0 4px 18px rgba(77, 77, 79, 0.18);
}

.contact-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.contact-copy p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #4D4D4F;
  line-height: 1.4;
  max-width: 560px;
  text-wrap: pretty;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}

.contact-links .text-link {
  color: #4D4D4F;
  font-weight: 700;
}

.contact-links .text-link:hover {
  color: #CB3D2D;
  text-decoration: underline;
}

/* ---- Scroll fade-in (JS adds .fade-pending, removes on intersect) ---- */

.fade-pending {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in {
  opacity: 1;
  transform: none;
}

/* ---- Responsive ---- */

@media (max-width: 780px) {
  .cards,
  .pair,
  .decisions,
  .split,
  .quotes {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .cards {
    gap: 0;
  }

  .card-body {
    padding-top: 12px;
  }

  .card + .card {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid #ECECEB;
  }

  .pair-arrow {
    display: none;
  }

  .contact .container {
    flex-direction: column;
    text-align: center;
  }

  .contact-copy {
    align-items: center;
  }

  .contact-links {
    justify-content: center;
  }

  .swatch .name,
  .swatch .hex {
    display: none;
  }

  .swatch {
    padding: 0;
  }
}
