/* ============================================
   HOMEPAGE v3
   Values come from the approved Paper mockup "Portfolio v3"
   (Home – Desktop at 1440, Home – Mobile at 390).
   Loaded after styles.css. Everything is scoped to body.home, and uses
   !important where styles.css forces weights and colors on body *.
   One breakpoint: 800px (SKILL.md).
   ============================================ */

body.home {
  background: #FFFFFF !important;
  color: #151515 !important;
}

/* Hero ---------------------------------------------------------------- */

/* Max width: reels are encoded 1032 wide, so the content column (1032 + 2 x 32px
   padding) shows them at their own size instead of stretching them soft. */
.home .home-main {
  max-width: 1096px;
  margin: 0 auto;
  padding: 0 32px;
}

.home .home-hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 120px 0 120px;
}

.home .home-hero__title {
  max-width: 1080px !important;
  margin: 0 !important;
  color: #151515 !important;
  font-size: 47px !important;
  line-height: 54px !important;
  letter-spacing: -0.065em !important;
  font-weight: 400 !important;
}

.home .home-hero__muted {
  color: #8B8B8B !important;
  letter-spacing: -0.035em !important;
}

.home .home-hero__note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.home .home-hero__line {
  margin: 0 !important;
  color: #747474 !important;
  font-size: 18px !important;
  line-height: 24px !important;
  letter-spacing: -0.02em !important;
  font-weight: 500 !important;
}

/* Same type as the lines around it (Carlos: all three lines the same size). */
.home .home-hero__mark {
  margin: 0 !important;
  padding: 2px 0;
  color: #151515 !important;
  font-size: 18px !important;
  line-height: 24px !important;
  letter-spacing: -0.02em !important;
  font-weight: 500 !important;
}

/* Marker: a highlighter stroke with tilted, uneven ends. box-decoration-break
   gives each wrapped line its own stroke. */
.home .marker {
  color: #151515 !important;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3.5 2.6 C40 1.4 90 2.2 140 1.2 C165 0.8 185 1.6 199 0.4 L196.6 17.4 C170 18.6 120 17.6 80 18.8 C50 19.4 20 18.4 0.6 19.6 Z' fill='%23F2FF66'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 4px 7px;
  margin: 0 -7px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Section label --------------------------------------------------------- */

.home .home-label {
  display: flex;
  gap: 12px;
  margin: 0 !important;
  padding-bottom: 20px;
  color: #151515 !important;
  font-size: 12px !important;
  line-height: 14px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  font-weight: 600 !important;
}

.home .home-label__muted {
  color: #8E8E8E !important;
  letter-spacing: 0.04em !important;
  font-weight: 600 !important;
}

/* Featured work --------------------------------------------------------- */

.home .work {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 140px;
  color: inherit;
  text-decoration: none;
}

.home .work--aa { padding-bottom: 160px; }

.home .work:focus-visible {
  outline: 2px solid #151515;
  outline-offset: 6px;
}

.home .work__caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.home .work--adaptiveshop .work__caption { padding-top: 4px; }

/* Title with "Learn more" under it. */
.home .work__copy { display: flex; flex-direction: column; gap: 14px; }

.home .work__title {
  max-width: 760px;
  margin: 0 !important;
  color: #151515 !important;
  font-size: 25px !important;
  line-height: 28px !important;
  letter-spacing: -0.05em !important;
  font-weight: 400 !important;
}

.home .work__muted {
  color: #8B8B8B !important;
  transition: color 0.2s ease;
}

.home a.work:hover .work__muted,
.home .work--dds:hover .work__muted { color: #5E5E5E !important; }

/* DDS card: the copy links to the DDS page; the video is a player with controls. */
.home .work__link {
  color: inherit;
  text-decoration: none;
}

.home .work__link:focus-visible { outline: 2px solid #151515; outline-offset: 6px; }

/* "Learn more" under the DDS copy: the copy is the link, and this says so. */
.home .work__more {
  margin: 0 !important;
  color: #8B8B8B !important;
  font-size: 16px !important;
  line-height: 21px !important;
  letter-spacing: -0.02em !important;
  font-weight: 500 !important;
}

.home .work__more-label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.home .work__more .text-arrow { display: inline-block; transition: transform 0.2s ease; }

@media (hover: hover) {
  .home a.work:hover .work__more,
  .home .work__link:hover .work__more { color: #5E5E5E !important; }
  .home a.work:hover .work__more .text-arrow,
  .home .work__link:hover .work__more .text-arrow { transform: translateX(3px); }
}

.home .work__tag {
  flex-shrink: 0;
  margin: 0 !important;
  padding-top: 6px;
  color: #8E8E8E !important;
  font-size: 12px !important;
  line-height: 14px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  font-weight: 600 !important;
}

/* Copy beside the media (DDS, Agent Ring, Eloquii) */
.home .work--side {
  flex-direction: row;
  align-items: flex-end;
  gap: 24px;
}

.home .work__side-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 440px;
}

/* Personal projects: the same highlighter stroke as the hero marker, so they're easy to tell apart */
.home .work__personal {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 7px 2px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3.5 2.6 C40 1.4 90 2.2 140 1.2 C165 0.8 185 1.6 199 0.4 L196.6 17.4 C170 18.6 120 17.6 80 18.8 C50 19.4 20 18.4 0.6 19.6 Z' fill='%23F2FF66'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #151515;
}

.home .work__side-copy .work__tag { padding-top: 0; }
.home .work--side .work__media { flex: 1 1 auto; min-width: 0; }

/* Media ------------------------------------------------------------------ */

.home .media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #F0F0F0;
}

.home .media--round { border-radius: 6px; }

/* The Eloquii reel is rendered at 1376 x 780 (tools/portfolio-assets/remotion). */
.home .media--tile { height: auto; aspect-ratio: 1376 / 780; }

/* Remotion reels render at the tile size, so they show at their own aspect. */
.home .media--reel-control { height: auto; aspect-ratio: 1376 / 820; }
.home .media--reel-surface { height: auto; aspect-ratio: 1376 / 722; }
.home .media--reel-lineform { height: auto; aspect-ratio: 1376 / 852; }
.home .media--reel-adaptiveshop,
.home .media--reel-rankbee,
.home .media--reel-loca { height: auto; aspect-ratio: 1376 / 852; }
.home .media--reel-aa { height: auto; aspect-ratio: 1376 / 780; }

.home .work__media--dds .media { aspect-ratio: 912 / 513; background-color: #000; }
/* Round the video like the other cards; the wrapper clips the native controls too. */
.home .work__media--dds { border-radius: 6px; overflow: hidden; }

.home .tile {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.home .tile--black { background-color: #000000; }

/* Round the Agent Ring tile like the other cards. */
.home .tile--ring { border-radius: 6px; overflow: hidden; }

.home .tile--ring { aspect-ratio: 912 / 600; }

.home .tile--ring .ring {
  display: block;
  height: 93.333%; /* 560 of 600 */
  width: auto;
  aspect-ratio: 800 / 654;
  background-color: #000;
}

/* More work --------------------------------------------------------------- */

.home .more { padding-bottom: 160px; }

.home .more__title {
  margin: 0 !important;
  padding-bottom: 40px;
  color: #151515 !important;
  font-size: 47px !important;
  line-height: 54px !important;
  letter-spacing: -0.055em !important;
  font-weight: 400 !important;
}

.home .more__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #D4D4D4;
}

.home .more__row {
  display: grid;
  grid-template-columns: 220px 140px minmax(0, 1fr) 110px;
  align-items: center;
  column-gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid #D4D4D4;
  color: inherit;
  text-decoration: none;
}

.home .more__name {
  color: #151515 !important;
  font-size: 20px !important;
  line-height: 25px !important;
  letter-spacing: -0.035em !important;
  font-weight: 500 !important;
}

.home .more__row:hover .more__name,
.home .more__row:focus-visible .more__name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.home .more__kind {
  color: #8A8A8A !important;
  font-size: 12px !important;
  line-height: 14px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  font-weight: 500 !important;
}

.home .more__purpose {
  color: #666666 !important;
  font-size: 16px !important;
  line-height: 20px !important;
  letter-spacing: -0.035em !important;
  font-weight: 500 !important;
}

.home .more__status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8A8A8A !important;
  font-size: 12px !important;
  line-height: 15px !important;
  letter-spacing: 0 !important;
  font-weight: 600 !important;
}

.home .more__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4CAF50;
}

.home .more__preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: min(500px, 42vw);
  height: auto;
  border: 1px solid #5E5E5E; /* dark gray edge so white pages don't melt into the page */
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

@media (hover: hover) and (pointer: fine) and (min-width: 800px) {
  .home .more__row:hover .more__preview { opacity: 1; }
}

/* Footer ----------------------------------------------------------------- */

.home .home-footer {
  display: flex;
  justify-content: center;
  padding: 0 32px 48px;
}

.home .home-footer p {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 16px !important;
  line-height: 20px !important;
  letter-spacing: -0.035em !important;
  font-weight: 500 !important;
}

/* Pinned review note -------------------------------------------------------- */

/* The top bar lines up with the content column. */
.home .top-bar {
  max-width: 1096px !important;
  margin: 0 auto !important;
}

.home .review-note {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 400px;
  padding: 18px 18px 20px 20px;
  background-color: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.home .review-note[hidden] { display: none; }
.home .review-note.is-visible { opacity: 1; transform: none; }

.home .review-note__copy {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
}

.home .review-note__title {
  margin: 0 !important;
  color: #151515 !important;
  font-size: 15px !important;
  line-height: 19px !important;
  letter-spacing: -0.02em !important;
  font-weight: 600 !important;
}

.home .review-note__body {
  margin: 0 !important;
  color: #5E5E5E !important;
  font-size: 14px !important;
  line-height: 19px !important;
  letter-spacing: -0.01em !important;
  font-weight: 500 !important;
}

.home .review-note__title .marker { padding: 2px 6px; margin: 0 -6px; }

.home .review-note__close {
  flex-shrink: 0;
  display: flex;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #151515;
  cursor: pointer;
  transition: color 0.15s ease;
}

@media (hover: hover) {
  .home .review-note__close:hover { color: #8E8E8E; }
}

/* Small touch targets need room: pad the hit area without moving the icon. */
.home .review-note__close::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
}

.home .review-note__close:focus-visible {
  outline: 2px solid #151515;
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .home .review-note { transition: none; transform: none; }
}

/* Mobile (below 800px) ------------------------------------------------------ */

@media (max-width: 799px) {
  .home .home-main { padding: 0 20px; }

  .home .home-hero { gap: 24px; padding: 72px 0; }

  .home .home-hero__title {
    font-size: 34px !important;
    line-height: 38px !important;
  }

  .home .home-hero__note { gap: 4px; }

  .home .home-hero__line {
    font-size: 16px !important;
    line-height: 22px !important;
  }

  .home .home-hero__mark {
    padding: 1px 0;
    font-size: 16px !important;
    line-height: 22px !important;
  }

  .home .marker { padding: 2.5px 6px; margin: 0 -6px; }

  .home .home-label { gap: 10px; padding-bottom: 16px; color: #000000 !important; }

  .hide-mobile { display: none !important; }

  .home .work,
  .home .work--side {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 72px;
  }

  .home .work--aa { padding-bottom: 96px; }

  .home .work__caption { flex-direction: column; gap: 12px; }
  .home .work--adaptiveshop .work__caption { padding-top: 0; }

  .home .work__title {
    font-size: 20px !important;
    line-height: 23px !important;
    color: #000000 !important;
  }

  .home .work__tag {
    padding-top: 0;
    font-size: 11px !important;
    line-height: 13px !important;
  }

  .home .work__side-copy { flex: none; gap: 12px; }
  .home .work--side .work__media { order: -1; }
  .home .work__side-copy .work__tag { order: 2; }
  .home .work__side-copy .work__more { order: 3; }
  /* Phones: title, tag, then Learn more, same as DDS. */
  .home .work__copy { display: contents; }
  .home .work__caption .work__more { order: 3; }

  .home .work__media--dds .media { aspect-ratio: 350 / 197; }

  .home .more { padding-bottom: 96px; }

  .home .more__title {
    padding-bottom: 24px;
    font-size: 34px !important;
    line-height: 38px !important;
    color: #000000 !important;
  }

  .home .more__row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 0;
  }

  .home .more__name {
    font-size: 18px !important;
    line-height: 22px !important;
    color: #000000 !important;
  }

  .home .more__purpose {
    font-size: 14px !important;
    line-height: 18px !important;
    letter-spacing: -0.035em !important;
  }

  .home .more__kind,
  .home .more__status,
  .home .more__preview { display: none !important; }

  .home .home-footer { padding: 0 20px 40px; }

  .home .home-footer p {
    font-size: 15px !important;
    line-height: 18px !important;
    color: #000000 !important;
  }

  .home .review-note {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    gap: 12px;
    padding: 16px;
  }

  .home .review-note__copy { gap: 5px; }
}

/* Designing with AI banner, under the hero (Paper "Designing with AI banner",
   Home – Desktop). Light blue #F0F5FC picked 2026-12-05; gray text is #6E6E6E
   because #8B8B8B fails 4.5:1 on the tint. Hover deepens the tint. */
.home .ai-banner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 24px;
  border-radius: 6px;
  background: #F0F5FC;
  color: #151515;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.home .ai-banner:hover { background: #DBE7F8; }

/* Paper: 72px from the banner to the "Selected work" label. */
.home .ai-banner + .home-label { padding-top: 72px; }

.home .ai-banner:focus-visible {
  outline: 2px solid #151515;
  outline-offset: 2px;
}

.home .ai-banner__label {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

.home .ai-banner__body {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home .ai-banner__text {
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.home .ai-banner__muted {
  color: #6E6E6E;
  font-weight: 500;
}

.home .ai-banner__more .text-arrow { display: inline-block; transition: transform 0.2s ease; }

@media (hover: hover) {
  .home .ai-banner:hover .ai-banner__more .text-arrow { transform: translateX(3px); }
}

.home .ai-banner__more {
  flex-shrink: 0;
  color: #6E6E6E;
  font-size: 16px;
  line-height: 21px;
  letter-spacing: -0.02em;
  font-weight: 500;
}

/* Falling letters + repair robots (ai-banner-robots.js, desktop only).
   Letters fall in a page-wide layer under the AdaptiveShop video, so they drop
   behind it; robots fly in a layer over the page. Both layers clip at the
   browser edges so nothing adds a sideways scroll. */
.home .ai-fall__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.home .ai-fall__word { white-space: nowrap; }
.home .ai-fall__ch { display: inline-block; white-space: pre; }
.home .ai-fall__ch.is-gone { visibility: hidden; }

.ai-fall-layer,
.ai-bot-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.ai-fall-layer { z-index: 2; }
.ai-bot-layer { z-index: 30; }

/* The video sits above the falling letters. */
.home.ai-fall-on .work--adaptiveshop .work__media {
  position: relative;
  z-index: 3;
}

.ai-fall__ghost,
.ai-bot {
  position: absolute;
  top: 0;
  left: 0;
}

.ai-fall__ghost,
.ai-bot__ch {
  white-space: pre;
  transform-origin: 50% 80%;
}

.ai-bot {
  width: 28px;
  height: 28px;
  transform-origin: 50% 50%;
}

.ai-bot__svg {
  display: block;
  width: 28px;
  height: 28px;
  overflow: visible;
  animation: ai-bot-bob 0.5s ease-in-out infinite alternate;
}

.ai-bot__ch { position: absolute; }

.ai-bot__light {
  fill: #FF4D4D;
  animation: ai-bot-blink 0.9s steps(1) infinite;
}

.ai-bot__jet {
  transform-origin: 12px 19.4px;
  animation: ai-bot-jet 0.12s linear infinite alternate;
}

@keyframes ai-bot-bob { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes ai-bot-blink { 50% { fill: #FFD0D0; } }
@keyframes ai-bot-jet { from { transform: scaleY(0.7); } to { transform: scaleY(1.15); } }

@media (max-width: 799px) {
  .home .ai-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 20px;
  }

  .home .ai-banner__body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .home .ai-banner__text { font-size: 16px; line-height: 23px; }
  .home .ai-banner__more { font-size: 15px; line-height: 20px; }
  .home .ai-banner + .home-label { padding-top: 44px; }
}
