/* =====================================================================
   ABOUT and CONTACT pages in the cartoon look of the project pages.
   Loaded after styles.css and etherlocked-cartoon.css; the body carries
   .ether-page (tokens, header, menu drawer, buttons, footer, scroll-up)
   plus .about-page or .contact-page.

   1. About: intro
   2. About: hobbies
   3. About: journey
   4. Contact
   ===================================================================== */

/* ───────────── 1. ABOUT: INTRO ───────────── */
/* the intro is the page's hero: the same dark night colour as the home hero,
   a little taller than the screen so the pencil line along its bottom edge
   sits just below the first view */
.about-page .about {
  min-height: calc(100vh + var(--stroke-thick) + 2px);
  min-height: calc(100svh + var(--stroke-thick) + 2px);
  padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-xl);
  background: var(--night);
  border-bottom: var(--stroke-thick) solid var(--pencil);
}

.about-page .about-me {
  gap: var(--space-l);
  padding-inline: var(--page-gutter);
}

/* portrait: a slightly tilted picture with wobbly corners, no outline */
.about-page .my-image {
  overflow: hidden;
  border: 0;
  border-radius: var(--wobble);
  transform: rotate(-2deg);
}

.about-page .my-image .mainImage,
.about-page .my-image .overlayImage {
  border-radius: 0;
}

.about-page .about-title {
  margin-bottom: var(--title-gap);
  font-family: var(--cartoon-font);
  font-weight: 900;
  font-size: var(--fs-h1);
  line-height: var(--lh-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--orange);
}

.about-page .about-desc {
  margin-bottom: var(--space-s);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
}

/* key words: the same highlighter mark as the project pages */
.about-page .about-desc span {
  padding: 0.02em 0.18em;
  margin-inline: -0.05em;
  font-weight: 400;
  color: var(--orange-dk);
  background: var(--mark);
  border-radius: 0.4em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.about-page .text-block {
  margin-bottom: var(--flow-gap);
}

/* ───────────── 2. ABOUT: HOBBIES ───────────── */
.about-page .hobby-title {
  margin-bottom: var(--space-s);
  font-family: var(--cartoon-font);
  font-weight: 900;
  font-size: var(--fs-h3);
  line-height: var(--lh-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}

.about-page .hobby-circles {
  gap: var(--space-s);
}

/* the same chip as the scroll-up button and the footer social links */
.about-page .hobby-circles .circle {
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.5rem;
  color: var(--orange-hi);
  background: var(--paper-3);
  border: var(--stroke-thick) solid var(--pencil);
  border-radius: var(--wobble-sm);
  box-shadow: none;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.about-page .hobby-circles .circle:hover {
  color: var(--mustard);
  background: var(--paper-3);
  border-color: var(--orange);
  transform: rotate(-6deg);
}

.about-page .hobby-circles .circle.active,
.about-page .hobby-circles .circle[aria-pressed="true"] {
  color: var(--ink);
  background: var(--mustard);
  border: var(--stroke-thick) solid var(--mustard);
  box-shadow: none;
}

.about-page .hobby-circles .circle:focus-visible {
  outline: var(--stroke-thick) solid var(--text);
  outline-offset: 3px;
}

/* "Press here!": a little tilted sticker, like the number badges on the
   project pages, with a bold curved arrow under it pointing at the buttons */
.about-page .hobby-note {
  margin: 0 0 0 2.2rem;
  padding: 0.15em 0.65em;
  font-family: var(--cartoon-font);
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  background: var(--mustard);
  border-radius: var(--wobble-sm);
  transform: rotate(-5deg);
}

.about-page .hobbies-right {
  align-items: flex-start;
  gap: 0;
}

/* wide screens: the sticker and arrow sit right beside the buttons, not
   pushed to the far side of the column */
@media (min-width: 768px) {
  .about-page .hobbies-wrapper {
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .about-page .hobbies-left {
    flex: none;
  }
}

/* the sticker sits on top, and the arrow's tail starts under it */
.about-page .hobby-note {
  position: relative;
  z-index: 1;
}

.about-page .hobby-arrow {
  width: 8rem;
  height: auto;
  margin: -1.3rem 0 0 -1.1rem;
  overflow: visible;
  color: var(--mustard);
}

.about-page .hobby-arrow__fill {
  fill: currentColor;
}

/* phones: the hobby buttons sit straight under the photo, so pressing one
   shows its doodle on the picture right above it (the text follows) */
@media (max-width: 767px) {
  .about-page .about-paragraph {
    display: contents;
  }

  .about-page .my-image {
    order: 1;
  }

  .about-page .hobbies-wrapper {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-page .hobby-title {
    margin-bottom: var(--space-xs);
  }

  .about-page .hobby-circles {
    justify-content: center;
  }

  /* the heading still opens the page, above the photo */
  .about-page .text-block {
    display: contents;
  }

  .about-page .about-title {
    order: 0;
    margin-bottom: 0;
  }

  .about-page .about-desc {
    order: 3;
    margin-bottom: 0;
  }
}

/* ───────────── 3. ABOUT: JOURNEY ───────────── */
.about-page .journey-title {
  padding-block: 0 var(--space-xl);
}

.about-page .journey-title .section-title {
  margin: 0;
  font-size: var(--fs-h1);
}

/* the forest: the tree outlines down both sides of the road, in their own
   dark olive green (the PNGs are used as masks, so only their lines show).
   Wide screens only; on narrower ones there is no room beside the road. */
.about-page .journey-forest {
  /* width of one tree drawing: the section is about 1630px tall on wide
     screens (an 820px wide road map), and the drawings are 595 × 2269 */
  --trees-w: 427px;
  position: relative;
  /* edge to edge: cancel the section's side padding */
  margin-inline: calc(-1 * var(--journey-pad, 0px));
  padding-bottom: var(--space-xl);
  overflow: hidden;
}

.about-page .journey.section {
  --journey-pad: 0px;
  padding-top: var(--section-gap);
  padding-inline: 0;
}

@media (min-width: 1000px) {
  .about-page .journey-forest::before,
  .about-page .journey-forest::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    /* each drawing keeps its own shape (as tall as the section); it is
       pushed outwards so it reaches at most 4rem under the road, and the
       screen edge crops whatever does not fit */
    width: var(--trees-w);
    background: rgb(64, 52, 15); /* the drawings' own olive */
    -webkit-mask: none center / 100% 100% no-repeat;
    mask: none center / 100% 100% no-repeat;
    pointer-events: none;
  }

  .about-page .journey-forest::before {
    left: min(0px, (100% - 820px) / 2 + 4rem - var(--trees-w));
    -webkit-mask-image: url("../img/about/about-left.png");
    mask-image: url("../img/about/about-left.png");
  }

  .about-page .journey-forest::after {
    right: min(0px, (100% - 820px) / 2 + 4rem - var(--trees-w));
    -webkit-mask-image: url("../img/about/about-right.png");
    mask-image: url("../img/about/about-right.png");
  }
}

/* the map: an SVG road (drawn in a 1032 × 1990 box) with the job list laid
   over it. Each stop is placed in % of that box, next to its pin. */
.about-page .journey-map {
  --road: var(--pencil);
  --pin: var(--orange);
  position: relative;
  z-index: 1;
  width: min(820px, 100% - 2 * var(--page-gutter));
  max-width: none;
  margin-inline: auto;
  padding: 0;
  aspect-ratio: 1032 / 1990;
}

.about-page .journey-road {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* the road: a dashed pencil line, like a trail drawn on a map */
.about-page .journey-road__line {
  fill: none;
  stroke: var(--road);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 26 22;
}

/* pins: plain orange, no outline */
.about-page .journey-road__pins {
  fill: var(--pin);
}

/* the hole in each pin shows the page colour */
.about-page .journey-road__holes {
  fill: var(--paper);
}

.about-page .journey-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-page .journey-stop {
  position: absolute;
  max-width: 66%;
  transform: translateY(-50%);
}

/* left stops start just right of their pin; right stops end left of it */
.about-page .journey-stop--1 { top: 15.4%; left: 15%; }
.about-page .journey-stop--2 { top: 36.4%; right: 15%; text-align: right; }
.about-page .journey-stop--3 { top: 60.4%; left: 15%; }
.about-page .journey-stop--4 { top: 83.2%; right: 16.5%; text-align: right; }

/* titles: the site's orange uppercase card titles */
.about-page .journey-stop__title {
  margin: 0 0 var(--space-2xs);
  font-family: var(--cartoon-font);
  font-weight: 900;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: var(--lh-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--orange);
}

.about-page .journey-stop__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) var(--space-l);
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: var(--lh-snug);
  color: color-mix(in srgb, var(--text) 65%, transparent);
}

/* the company stands out a little from the dates and place */
.about-page .journey-stop__meta span:first-child {
  color: var(--text);
}

.about-page .journey-stop--2 .journey-stop__meta,
.about-page .journey-stop--4 .journey-stop__meta {
  justify-content: flex-end;
}

/* phones: the winding road gets too small to read beside, so the stops
   become a straight dashed line down the left with a pin at each one */
@media (max-width: 700px) {
  .about-page .journey-map {
    aspect-ratio: auto;
  }

  .about-page .journey-road {
    display: none;
  }

  .about-page .journey-list {
    position: relative;
    display: grid;
    gap: var(--space-xl);
    padding: var(--space-xs) 0 var(--space-xs) 3.25rem;
  }

  /* the dashed road */
  .about-page .journey-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0.95rem;
    border-left: var(--stroke-thick) dashed var(--road);
  }

  .about-page .journey-stop {
    position: relative;
    inset: auto;
    max-width: none;
    text-align: left;
    transform: none;
  }

  /* map pin: a rounded square with one sharp corner, turned to point down */
  .about-page .journey-stop::before {
    content: "";
    position: absolute;
    top: 0.35rem;
    left: -3.05rem;
    width: 1.6rem;
    height: 1.6rem;
    background: radial-gradient(circle, var(--paper) 0 0.18rem, var(--pin) 0.21rem);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
  }

  .about-page .journey-stop .journey-stop__meta {
    justify-content: flex-start;
    gap: var(--space-3xs) var(--space-m);
  }
}

/* ───────────── 4. CONTACT ───────────── */
/* the whole page is one hero: the same solid night colour as the home and
   About heroes (instead of the old reddish fade), robot and campfire on top */
.contact-page .contact.section {
  background-color: var(--night);
  background-image: url("../img/contact/contact-robot.png");
}

.contact-page {
  background-color: var(--night);
}

@media screen and (max-width: 1000px) {
  .contact-page .contact.section {
    background-image: none;
  }
}

/* the text sits well in from the edge of the screen: about 8% of the width
   on big screens, never less than the usual page gutter on small ones */
.contact-page .contact.section {
  padding-inline: 0;
}

.contact-page .contact-content.container {
  padding-inline: max(var(--page-gutter), 8vw);
}

.contact-page .contact-social a {
  color: var(--orange-hi);
}

.contact-page .contact-content .section-title {
  margin-bottom: var(--title-gap);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  text-shadow: 0 4px 0 rgba(45, 25, 13, 0.55), 0 10px 40px rgba(0, 0, 0, 0.6);
}

.contact-page .contact-description {
  margin-bottom: var(--flow-gap);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--text);
}

/* links: highlighter mark, mustard on hover */
.contact-page .contact-description a {
  padding: 0.02em 0.18em;
  font-weight: 400;
  color: var(--orange-dk);
  background: var(--mark);
  border-radius: 0.4em;
  transition: color 0.2s ease;
}

.contact-page .contact-description a:hover,
.contact-page .contact-description a:focus-visible {
  color: var(--mustard);
}

.contact-page .contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

@media (prefers-reduced-motion: reduce) {
  .about-page .hobby-circles .circle:hover {
    transform: none;
  }
}
