/* ============================================================
   About page — Info-style columns, text slides open from centre.
   ============================================================ */

:root {
  --bg: #ffffff;
  --fg: #000000;
  /* mix-blend-difference chrome source (frame lines, mobile logo) */
  --ink: #ffffff;
  --font-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --fs-body: clamp(15px, 1.9vw, 18px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;  /* always the custom + — never pointer/text/others */
}

/* Custom cursor: a "+" that inverts against the page, rotating into an "×"
   over anything clickable. */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor__inner {
  position: absolute;
  inset: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cursor__inner::before,
.cursor__inner::after {
  content: "";
  position: absolute;
  background: #fff;
}
.cursor__inner::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.cursor__inner::after  { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }
.cursor.is-x .cursor__inner { transform: rotate(45deg); }

html,
body {
  height: 100%;
}

/* Theme colour on the root too, so safe-area / overscroll strips show white rather
   than a black band. */
html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  letter-spacing: -0.015em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.about {
  position: fixed;
  inset: 0;
}

/* Full-screen layout lines framing the bio text (like the Info page) */
.about__lines {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: difference;
}

.about__line--v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.5px;
  background: var(--ink);
}

.about__line--h {
  position: absolute;
  left: 0;
  right: 0;
  height: 0.5px;
  background: var(--ink);
}

/* Columns: name · social · downloads · email · text(wide) · nav */
.about__row {
  display: grid;
  /* Contacts + bio centred as a group (justify-content), with the bio kept at its full
     ~62ch reading width rather than squeezed by big side padding. Logo + nav are pinned
     to the screen edges separately (below), so the central content still sits centred
     on screen — the index model: chrome at the edges, content centred. */
  grid-template-columns: auto auto auto minmax(0, 62ch);
  justify-content: center;
  column-gap: clamp(20px, 1.9vw, 44px);
  align-items: start;
  /* first line sits on the nav-bar centreline. Each side reserves the exact footprint of
     the fixed chrome — left: inset + logo width (6.79em); right: inset + nav width (9.41em
     + its two gaps) — so the content centres in the space BETWEEN the logo and the nav.
     The gap to the nav then equals the gap from the logo to Instagram (symmetric). */
  padding: calc(50vh - 0.6em)
           calc(clamp(20px, 2.2vw, 36px) + 9.41em + 2 * clamp(20px, 3vw, 48px))
           0
           calc(clamp(20px, 2.2vw, 36px) + 6.79em);
  height: 100vh;
  font-size: var(--fs-body);
  line-height: 1.15;
}

/* Logo (left) + nav (right) pinned to the screen edges — the same fixed "bar" as the
   index / space pages, so they hold the exact same position while the content centres.
   Desktop only: mobile keeps the logo centred and hides the nav (below). */
@media (min-width: 761px) {
  .about__logo,
  .about__nav {
    position: fixed;
    top: 50%;
    z-index: 6;
  }
  .about__logo { left: clamp(20px, 2.2vw, 36px); }
  .about__nav  { right: clamp(20px, 2.2vw, 36px); }
  /* Keep their vertical centring (translateY) through the left-to-right reveal. */
  .about__row > .about__logo,
  .about__row > .about__nav { transform: translate(-24px, -50%); }
  .about.is-in .about__row > .about__logo,
  .about.is-in .about__row > .about__nav { transform: translate(0, -50%); }
}

.about__logo,
.about__link,
.nav__link {
  color: var(--fg);
  text-decoration: none;
  font-weight: 400;
  white-space: nowrap;
}

/* Content links (social · downloads · email) are underlined; logo + nav stay clean. */
.about__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about__col {
  display: flex;
  flex-direction: column;
}

.about__text {
  max-width: 62ch;
  white-space: normal;
  line-height: 1.3;                 /* reading rhythm — matches the project Info description */
  /* Only the bio scrolls. Lift the scroll box to the top of the screen and
     pad the content back down so the first line still starts on the centreline
     — the text then scrolls up across the whole screen, not just its cell. */
  margin-top: calc(-50vh + 0.6em);
  padding-top: calc(50vh - 0.6em);
  padding-bottom: 15vh;             /* blank black space below the text */
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* IE/Edge */
}
.about__text::-webkit-scrollbar { display: none; }  /* WebKit */

.about__text p {
  margin: 0;
}

/* Portrait sits above the bio, inside the scroll box so it scrolls with the
   text. Half-width — never the full column. It's pulled up out of the flow so
   the bio's first line stays on the centreline (in line with the other
   columns); the photo lives in the black space above. The negative top margin
   ≈ the photo's own height (50% width × 2/3 for a 3:2 image = 33.34% of the
   container width) plus the gap below it. */
.about__photo {
  display: block;
  width: 50%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-top: calc(-33.34% - clamp(16px, 2vw, 28px));
  margin-bottom: clamp(16px, 2vw, 28px);
}
/* The mobile-only leading photo is hidden on desktop (the bio photo is used there). */
.about__photo--m { display: none; }

.about__nav {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
}

/* The in-column "Ask GiuLLM" trigger only exists on mobile (desktop uses the
   cursor pill). Compound selector so it beats giullm.css's .gm-ask display. */
.about__row .gm-ask--m { display: none; }

/* ---- Reveal left-to-right on arrival (staggered by column) ---- */
.about__row > * {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about.is-in .about__row > * {
  opacity: 1;
  transform: translateX(0);
}

/* ---- Mobile: logo pinned to the left, content from the centre line ---- */
@media (max-width: 760px) {
  body { overflow-y: auto; }
  .about { position: static; }

  /* On mobile only the nav bar animates — the columns/text just appear (no slide). */
  .about__row > *,
  .about.is-in .about__row > * { opacity: 1; transform: none; transition: none; }

  /* Logo pinned to the top-left corner, independent of the reveal. */
  .about__logo,
  .about.is-in .about__row > .about__logo {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 4vh, 34px));
    left: clamp(20px, 2.2vw, 36px);
    transform: none;
    color: var(--ink);            /* inverts against the page (mix-blend below) */
    opacity: 1;
    z-index: 2;
    mix-blend-mode: difference;
  }

  /* Nav lives only on the homepage on mobile. */
  .about__nav { display: none; }

  /* Order (top→bottom): photo, then contacts in their natural order (social,
     Portfolio + Curriculum, email), a blank gap, then the description. */
  .about__row {
    grid-template-columns: 1fr;
    row-gap: clamp(14px, 4vw, 24px);
    height: auto;
    /* Left-aligned single column, starting just below the fixed top-left logo. */
    justify-items: start;
    text-align: left;
    padding: calc(env(safe-area-inset-top, 0px) + clamp(88px, 20vh, 150px)) clamp(20px, 2.2vw, 36px) 12vh;
  }
  /* Leading photo first; the in-bio photo is hidden here. */
  .about__photo--m { order: -1; display: block; width: 70%; margin: 0; }
  .about__text .about__photo { display: none; }
  .about__text {
    max-width: none;
    /* Blank space between the contacts above and the description. */
    margin-top: clamp(40px, 9vh, 90px);
    padding-top: 0;
    padding-bottom: 0;
    max-height: none;
    overflow-y: visible;
  }

  /* The in-column "Ask GiuLLM" is dropped on mobile — the persistent bottom-right
     bubble covers it now. */
  .about__row .gm-ask--m { display: none; }
}

::selection { background: var(--fg); color: var(--bg); }
::-moz-selection { background: var(--fg); color: var(--bg); }

@media (max-width: 760px) {
  :root { --fs-body: clamp(17px, 4.8vw, 20px); }
}

