/* About page (/about/): "About me" panel + the resume as a paper document. Semantic tokens only.
   The paper page uses the --doc-* tokens (styles/tokens.css), the same in both themes, so it looks like a
   printed page lying on the desktop. Everything inside it is Fira Sans (the fun/plain heading toggle doesn't
   apply to the document). Layout follows the WINDOW width (container queries on .os-browser__page). */

:root {
  /* Values Nick chose with the Size tweaker (2026-11-04) */
  --about-scene-w: min(100%, 600px); /* the screens island scene (centered); phones: full width */
  --resume-w: 825px;                 /* the resume window */
  --resume-type: 0.93;               /* scales every text size on the paper page (all in em) */
}

.site-page.about {
  display: grid;
  gap: var(--space-6);
  max-width: none;
}

.about-col {
  width: 100%;
  max-width: var(--panel-max);
  margin-inline: auto;
}

/* ---- Header ---- */
.about-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
}

.about-title {
  margin: 0;
  color: var(--heading);
  font-size: calc(clamp(2.25rem, 1.5rem + 2.6cqi, 3.5rem) * var(--heading-scale));
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-leading);
}

.about-jump ul { justify-content: flex-start; }

/* ---- Section 1: About me ---- */
.about-sec__body {
  padding: var(--space-3);
  font-size: inherit;
  line-height: inherit;
}

.about-me {               /* one centered column: the scene big on top, then the text, then the email strip */
  display: grid;
  justify-items: center;
  gap: clamp(var(--space-4), 3cqi, var(--space-6));
  padding: clamp(var(--space-4), 3cqi, var(--space-6));
}

.about-me__text,
.about-me .about-email {
  width: 100%;
  max-width: min(75ch, 760px);
  font-family: var(--font-body);   /* so 75ch is measured in the paragraphs' font */
  font-size: 1.0625rem;
}
/* The intro is the panel's h2 (heading font, follows fun/plain), one step under the page's other h2s */
.about-me__text .about-me__intro {
  margin: 0 0 1em;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: calc(clamp(1.15rem, 2vw, 1.6rem) * var(--heading-scale));
  font-weight: var(--heading-weight);
  font-synthesis: none;
  letter-spacing: var(--heading-tracking);
  line-height: 1.3;
  text-align: center; /* only the intro; the bio stays left-aligned */
  text-wrap: balance;
}

.about-me__text p {
  max-width: 75ch;
  margin: 0 0 1em;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
}
.about-me__text p:last-child { margin-bottom: 0; }

/* ---- The screens island scene: the shared scene engine (components/cloud-scene.*) + its configuration
   (components/screens-island.*). This page only sets its width (--about-scene-w, top of this file). ---- */
.about-me__photo { width: var(--about-scene-w); margin: 0 auto; }

/* ---- Email strip (#contact, bottom of the About me panel) ---- */
.about-email {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--os-face);
  color: var(--os-text);
  border: 1px solid var(--os-outline);
  box-shadow: inset 1px 1px 0 var(--os-hi), inset -1px -1px 0 var(--os-lo);
  scroll-margin: var(--space-6) 0 calc(var(--space-6) + 72px); /* clear of the top edge and the floating dock */
}

.about-email__line {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
}

.about-email__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

.about-email__btn { min-width: 112px; min-height: 28px; }
.about-email__btn[hidden] { display: none; } /* shown by components/email.js once the link is put together */

.about-email__addr {
  margin: 0 4px;
  font-family: var(--font-chrome-text);
  font-size: 0.8125rem;
  line-height: 1.3;
  user-select: all;
  overflow-wrap: anywhere;
}

/* ---- Section 2: the resume window + paper page ---- */
.about-resume {
  width: 100%;
  max-width: var(--resume-w);
  margin-inline: auto;
  scroll-margin-top: var(--space-4);
}
.about-resume:focus { outline: none; } /* focused by the jump-to button for screen readers */

.about-resume__body { padding: var(--space-3); }

.doc {
  padding: clamp(var(--space-5), 4cqi, var(--space-8));
  background: var(--doc-bg);
  color: var(--doc-text);
  border: 1px solid var(--doc-rule);
  box-shadow: 0 1px 2px var(--doc-edge), 0 6px 16px var(--doc-shadow); /* soft sheet lying on the desktop */
  font-family: var(--font-body);
  font-size: calc(1rem * var(--resume-type)); /* everything inside is in em, so this one value scales the page */
  line-height: 1.55;
}

.doc :is(h3, h4, p, ul) { margin: 0; }
.doc :is(h3, h4) {         /* a document: body font in both heading modes */
  font-family: var(--font-body);
  font-synthesis: none;
  letter-spacing: 0;
  color: var(--doc-text);
}

.doc-head {
  display: grid;
  gap: var(--space-2);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--doc-rule);
}

.doc-name {
  color: var(--doc-accent);
  font-size: 1.75em;
  font-weight: 700;
  line-height: 1.2;
}

.doc-role { font-style: italic; font-size: 1.0625em; }
.doc-summary { max-width: 75ch; }

.doc-where {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  color: var(--doc-muted);
}

.doc a:link,
.doc a:visited { color: var(--doc-accent); font-weight: 700; }
.doc a:focus-visible { outline: 2px solid var(--doc-accent); outline-offset: 2px; }

/* Two columns: work experience | skills, education, tools */
.doc-cols {
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(0, 36fr);
  padding-top: var(--space-5);
}

.doc-main { padding-right: var(--space-6); }
.doc-side {
  padding-left: var(--space-6);
  border-left: 1px solid var(--doc-rule);
}

.doc-main,
.doc-side { display: grid; align-content: start; gap: var(--space-4); }

.doc-label {
  font-size: 0.9375em;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.doc-side .doc-label:not(:first-child) { margin-top: var(--space-3); }

.doc-job { display: grid; gap: var(--space-2); }
.doc-job + .doc-job { padding-top: var(--space-2); }
.doc-job__title { font-size: 1.0625em; font-weight: 700; }

.doc-job__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 var(--space-4);
}
.doc-job__org { letter-spacing: 0.04em; }
.doc-job__dates { color: var(--doc-muted); margin-left: auto; }

.doc-job ul { padding-left: 1.2em; }
.doc-job li + li { margin-top: 0.3em; }

/* Skills / Tools: a real list shown as small outlined labels; each label wraps as a whole */
.doc-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}
.doc-inline li {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--doc-rule);
  border-radius: 3px;
  font-size: 0.9375em;
  line-height: 1.4;
  white-space: nowrap;
}

.doc-edu { display: grid; gap: 2px; }
.doc-edu__dates { color: var(--doc-muted); }

/* CRT softened over the paper: while the resume page is on screen (html.crt-soft, set by case-study.js),
   the overlay runs at ~55% so the small text isn't stripy. Still below the toggles; still no clicks. */
.crt-overlay { transition: opacity 0.3s ease; }
html.crt-soft .crt-overlay { opacity: 0.55; }
@media (prefers-reduced-motion: reduce) { .crt-overlay { transition: none; } }

/* ---- Closing ---- */
.about-end { padding-bottom: var(--space-4); }

/* ---- Narrow window (phones): stack everything ---- */
@container (max-width: 43.75rem) {
  .site-page.about { gap: var(--space-5); }
  .about-me__photo { width: 100%; }
  .about-email { align-items: stretch; }
  .about-email__action { align-items: stretch; }
  .about-email__btn { min-height: 44px; }
  .doc-cols { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .doc-main { padding-right: 0; }
  .doc-side { padding: var(--space-5) 0 0; border-left: 0; border-top: 1px solid var(--doc-rule); }
  .doc-job__dates { flex-basis: 100%; margin-left: 0; }
  .about .os-btn { min-height: 44px; padding-inline: 16px; }
}

@media (pointer: coarse) {
  .about .os-btn { min-height: 44px; }
}
