/* ============================================
   ABOUT + CONTACT, matched to the v3 homepage (home.css) and project pages
   (project.css): same column width, top bar, hero type and footer.
   Loaded after styles.css on about.html and contact.html only.
   One breakpoint: 800px (SKILL.md).
   ============================================ */

/* Column: 1096 max (1032 content + 2 x 32px), same as the homepage. */
.editorial-page .top-bar {
  max-width: 1096px !important;
  margin: 0 auto !important;
}

.editorial-page .editorial-content {
  max-width: 1096px !important;
  margin: 0 auto !important;
  padding: 120px 32px 120px !important;
}

/* Hero: the homepage h1. */
.editorial-page .editorial-content h1 {
  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;
}

/* Reading copy and section titles: the project page body and h2. */
.editorial-page .editorial-columns p,
.editorial-page .editorial-list p {
  font-size: 18px !important;
  line-height: 26px !important;
  letter-spacing: -0.02em !important;
  font-weight: 400 !important;
}

.editorial-page .editorial-list h2,
.editorial-page .library__title {
  font-size: 25px !important;
  line-height: 30px !important;
  letter-spacing: -0.05em !important;
  font-weight: 400 !important;
}

/* Footer: the homepage footer. */
.editorial-page footer.page {
  display: flex;
  justify-content: center;
  max-width: none !important;
  padding: 0 32px 48px !important;
}

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

@media (max-width: 799px) {
  .editorial-page .editorial-content { padding: 72px 20px 72px !important; }

  .editorial-page .editorial-content h1 {
    font-size: 34px !important;
    line-height: 38px !important;
  }

  .editorial-page .editorial-columns p,
  .editorial-page .editorial-list p {
    font-size: 16px !important;
    line-height: 23px !important;
  }

  .editorial-page .editorial-list h2,
  .editorial-page .library__title {
    font-size: 22px !important;
    line-height: 26px !important;
  }

  .editorial-page footer.page { padding: 0 20px 40px !important; }
}

/* ============================================
   CONTACT, option E from Paper ("Contact option E – links floating like
   thoughts"): heading and subline, then the drawing with the links floating
   above his head like thoughts. Links sit above the drawing and the thought
   dots (z-index) so they stay clickable.
   ============================================ */
.contact-page .contact-intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 100px;
}

.contact-page .contact-intro p {
  margin: 0;
  color: #747474;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.02em;
  font-weight: 500;
}

/* Stage: 720 wide. The art box is a 161px band for the links plus the
   drawing (trimmed bounds 1117x735 at +205+43 of the 1537x1023 source).
   The drawing is a sharp <img>; the WebGL frame draws only the blobs on a
   transparent canvas and multiplies them over it. The canvas starts 100px
   above the band so the blobs never hit a top edge. */
.contact-page { overflow-x: clip; }

.contact-stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.contact-art {
  position: relative;
  aspect-ratio: 720 / 634.77;
}

/* Clip only the bottom (at the drawing's edge), so nothing spills onto the
   footer; top and sides stay open. */
.contact-art__clip {
  position: absolute;
  inset: 0;
  z-index: 1;
  isolation: isolate;
  clip-path: inset(-40% -50% 0 -50%);
}

/* Full source width 1537/1117 of the stage, shifted left by the trim and
   down so the drawing's top sits at the bottom of the band. */
.contact-art__img {
  position: absolute;
  top: 0;
  left: -18.353%;
  display: block;
  width: 137.601%;
  max-width: none;
  height: auto;
  margin-top: 18.5115%;
}

/* Same width; starts 100/720 of the stage above it. */
.contact-art__blobs {
  position: absolute;
  top: 0;
  left: -18.353%;
  display: block;
  width: 137.601%;
  height: auto;
  aspect-ratio: 1.37601 / 1.23985;
  margin-top: -13.889%;
  border: 0;
  background: transparent;
  mix-blend-mode: multiply;
}

/* Thought dots, rising from his head. */
.contact-thought {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.contact-thought span {
  position: absolute;
  border-radius: 50%;
  background: #D9D9D9;
}

.contact-thought span:nth-child(1) { left: 62.778%; top: 23.631%; width: 8px; height: 8px; }
.contact-thought span:nth-child(2) { left: 65%; top: 20.165%; width: 12px; height: 12px; }

/* Floating links: above the dots and the drawing. */
.contact-float {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  height: 130px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none; /* the band still reaches the blobs; only the links take clicks */
}

.contact-float a { pointer-events: auto; }

/* Drift is driven by contact-float.js (eases to a stop on hover). */
.contact-float__item {
  position: absolute;
  will-change: transform;
}

.contact-float__item--email    { left: 16.667%; top: 72px; }
.contact-float__item--linkedin { left: 37.5%;   top: 8px; }
.contact-float__item--github   { left: 65.278%; top: 28px; }
.contact-float__item--x        { left: 83.333%; top: 96px; }

.contact-float a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #F4F4F4;
  color: #151515;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-float__name {
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.contact-float__detail {
  color: #6E6E6E;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
}

/* Homepage banner tints, one per link. #6E6E6E detail text passes 4.5:1 on each. */
.contact-float__item--email a    { background: #F0F5FC; }
.contact-float__item--linkedin a { background: #F4F0FB; }
.contact-float__item--github a   { background: #EEF7EF; }
.contact-float__item--x a        { background: #FEF4EC; }

/* Hover: the tint deepens; the text stays dark. */
.contact-float__item--email a:hover    { background: #DBE7F8; }
.contact-float__item--linkedin a:hover { background: #E5DCF6; }
.contact-float__item--github a:hover   { background: #DDEFDF; }
.contact-float__item--x a:hover        { background: #FDE6D4; }

.contact-float a:focus-visible {
  outline: 2px solid #151515;
  outline-offset: 2px;
}

/* Desktop: the stage moves up under the two-line intro. LinkedIn, GitHub and X
   sit beside the paragraph, Email sits 24px below it, and the drawing rises with
   them. Layers: intro text, then the drawing and blobs (the drawing itself
   starts below the text, so only the blobs pass over it), then the links. */
@media (min-width: 800px) {
  .contact-page .contact-intro {
    position: relative;
    z-index: 1;
    padding-bottom: 0;
  }

  .contact-stage { margin-top: -56px; }
}

/* Phone: the links wrap in a cloud above his head instead of fixed spots. */
@media (max-width: 799px) {
  .contact-page .contact-intro { padding-bottom: 56px; }

  .contact-page .contact-intro p {
    font-size: 16px;
    line-height: 23px;
  }

  /* Phone: the links simply stack, then the drawing. */
  .contact-float {
    position: relative;
    inset: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .contact-float__item {
    position: static;
  }

  .contact-float__name { font-size: 18px; line-height: 22px; }

  /* The links hug the left, so the drawing rises into the space beside them. */
  .contact-art { margin-top: -120px; }


}

/* ============================================
   ABOUT, from the Paper "About – Desktop (draft)" artboard (2026-12-05):
   intro, bio + Carlos LLM chat (484 / 484, 64 gap, chat as tall as the bio),
   How I got here (photos), How I work, Where I learned it, Outside work
   (records), then the live Experience timeline, Library and GitHub graph.
   ============================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Same top as Home and Contact; 24 below the intro. */

/* The intro is the page title, sized like the other page titles (Designing
   with AI, Contact), 72 above the first paragraph (48 on phones). */
.editorial-page .editorial-content h1.about-intro {
  max-width: 880px !important;
  padding-bottom: 72px;
  letter-spacing: -0.055em !important;
  text-wrap: balance;
}

.about-lede {
  margin: 0;
  max-width: none !important;
  color: #151515;
  font-size: 25px !important;
  line-height: 34px !important;
  letter-spacing: -0.04em !important;
  font-weight: 400 !important;
}

/* The chat moved to the nav ("Ask my AI"), so the bio runs the full column like the other ledes. */
.about-bio {
  padding: 0 0 96px;
}

.about-bio__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-link--button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.about-focus {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}

.about-focus p,
.about-rows dd {
  margin: 0;
  color: #151515;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.about-label {
  margin: 0;
  color: #8E8E8E;
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 0.04em;
  font-weight: 600;
  text-transform: uppercase;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 96px;
}

.about-h2 {
  margin: 0;
  color: #151515;
  font-size: 25px;
  line-height: 30px;
  letter-spacing: -0.05em;
  font-weight: 400;
}

.about-link {
  color: inherit;
  text-decoration: underline 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.about-link:hover { color: #8E8E8E; }

.about-photos {
  display: flex;
  gap: 24px;
}

.about-photos img {
  display: block;
  width: 328px;
  height: 328px;
  object-fit: cover;
  background: #E3E3E3;
}

.about-caption {
  margin: -16px 0 0;
  color: #8E8E8E;
  font-size: 14px;
  line-height: 20px;
}

.about-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
}

.about-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.about-row dt {
  flex: 0 0 240px;
  padding-top: 6px;
}

.about-row dd { width: 680px; }

.about-records {
  display: flex;
  gap: 24px;
}

.about-records img {
  display: block;
  width: 240px;
  height: 240px;
  object-fit: cover;
  background: #E3E3E3;
}

@media (max-width: 799px) {

  .editorial-page .editorial-content h1.about-intro { padding-bottom: 48px; }

  .about-lede {
    font-size: 20px !important;
    line-height: 27px !important;
  }

  .about-bio { padding-bottom: 64px; }

  .about-section { gap: 24px; padding-bottom: 64px; }

  .about-h2 { font-size: 22px; line-height: 26px; }

  .about-focus p,
  .about-rows dd { font-size: 16px; line-height: 23px; }

  .about-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .about-photos img,
  .about-records img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .about-caption { margin-top: -12px; font-size: 13px; line-height: 17px; }

  .about-row { flex-direction: column; gap: 8px; }
  .about-row dt { flex: none; padding-top: 0; }
  .about-row dd { width: auto; }

  .about-records {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Experience follows the new sections with Paper's 96px (the section's own padding). */
.editorial-page .about-section + .work-history { margin-top: 0 !important; }

/* Experience, Library and GitHub use the same rhythm as the sections above:
   96 between sections, text 34 below each heading (32 + the line's leading). */
.editorial-page .editorial-content .library,
.editorial-page .github-activity { margin-top: 96px !important; }

.editorial-page .work-history .library__title { margin-bottom: 0 !important; }
.editorial-page .work-history__list { padding-top: 32px; padding-bottom: 10px; min-height: 0; }
.editorial-page .work-history__rail { top: 65px; }
.editorial-page .work-history__tick { top: 26px; }

.editorial-page .library__scroll { padding-top: 0; padding-bottom: 0; }
.editorial-page .github-activity__summary { margin-top: 33px !important; }

@media (max-width: 799px) {
  .editorial-page .editorial-content .library,
  .editorial-page .github-activity { margin-top: 64px !important; }

  .editorial-page .library__title { margin-bottom: 24px !important; }
  .editorial-page .work-history__list { padding-top: 24px; padding-bottom: 10px; min-height: 0; }
  .editorial-page .work-history__rail { top: 57px; }
  .editorial-page .work-history__tick { top: 23px; }
  .editorial-page .github-activity__summary { margin-top: 25px !important; }
}

/* ============================================
   DESIGNING WITH AI, from the Paper "Designing with AI – Desktop" artboard:
   Same top as Home, About and Contact; 72 below the title; sections reuse the About classes.
   ============================================ */

.editorial-page .editorial-content h1.ai-title {
  max-width: 880px !important;
  padding-bottom: 72px;
  letter-spacing: -0.055em !important;
}

@media (max-width: 799px) {
  .editorial-page .editorial-content h1.ai-title { padding-bottom: 48px; }
}

/* ============================================
   DESIGNING WITH AI: small interactions (ai-play.js), one per emoji:
   ✨ robots rain, ⚡ the paragraph glitches, 📸 a suggestion card.
   ============================================ */
.play-emoji {
  display: inline-block;
  position: relative;
  margin: 0 0 0 0.18em;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.85em;
  line-height: 1;
  vertical-align: 0.05em;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-emoji:hover,
.play-emoji:focus-visible { transform: scale(1.25) rotate(-8deg); }

.play-emoji:focus-visible {
  outline: 2px solid #151515;
  outline-offset: 3px;
  border-radius: 4px;
}

.play-rain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
  pointer-events: none;
}

.play-rain span {
  position: absolute;
  top: -60px;
  font-family: 'TASA Orbiter', sans-serif;
  font-weight: 500 !important;
  line-height: 1;
  animation-name: play-fall;
  animation-timing-function: cubic-bezier(0.4, 0, 0.7, 1);
  animation-fill-mode: both;
}

@keyframes play-fall {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(calc(100vh + 80px)) rotate(var(--spin)); opacity: 0; }
}

.play-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
  color: #151515;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.02em;
  text-align: left;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.25s ease;
  pointer-events: none;
}

.play-card.is-in { opacity: 1; transform: none; }

.play-card__actions { display: flex; gap: 6px; }

.play-card__actions span {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 16px;
}

.play-card__actions span:nth-child(1) { background: #F0F5FC; }
.play-card__actions span:nth-child(2) { background: #EEF7EF; }

@media (prefers-reduced-motion: reduce) {
  .play-emoji, .play-card { transition: none; }
}
