/* ==========================================================================
   Portfolio — Template M401
   Design tokens and page styles per docs/design-specs-m401.md
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
  --base-size: 11.25px;
  --bg-dark: #111111;
  --bg-light: #F8F8F8;

  --text-1: rgba(255, 255, 255, 0.85);
  --text-2: rgba(255, 255, 255, 0.75);
  --text-3: rgba(255, 255, 255, 0.6);
  --text-4: rgba(255, 255, 255, 0.4);
  --text-5: rgba(255, 255, 255, 0.25);
  --text-near-white: rgba(255, 255, 255, 0.95);

  --accent: #FF0000;
  --hr: rgba(255, 255, 255, 0.15);
  --link-underline: rgba(127, 127, 127, 0.2);

  --mobile-scale: 1.4;
  --mobile-padding-offset: 0.85;
  --viewport-height: 100vh;
}

body {
  --swatch-1: rgba(255, 255, 255, 0.85);
  --swatch-2: rgba(255, 255, 255, 0.75);
  --swatch-3: rgba(255, 255, 255, 0.6);
  --swatch-4: rgba(255, 255, 255, 0.4);
  --swatch-5: rgba(255, 255, 255, 0.25);
  --swatch-6: rgba(255, 255, 255, 0.85);
}

/* -------------------------------------------------------------------------
   2. Base resets
   ------------------------------------------------------------------------- */
html {
  font-size: var(--base-size);
}

html, body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
}

body {
  display: flex;
  flex-direction: column;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Diatype Variable is proprietary; using Inter Tight as a close visual stand-in
   (neo-grotesque, similar x-height + terminal angles). */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;450;500;600;700&display=swap');

:root {
  --font-stack: "Inter Tight", "Diatype Variable", -apple-system, "system-ui", Inter, "Segoe UI", Roboto, sans-serif;
}

/* -------------------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------------------- */
bodycopy {
  display: block;
  font-family: var(--font-stack);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-3);
  line-height: 1.25;
  letter-spacing: -0.004em;
  font-variation-settings: 'slnt' 0, 'MONO' 0;
}

h1 {
  font-family: var(--font-stack);
  font-size: 3.5rem;
  font-weight: 650;
  color: var(--text-1);
  line-height: 1;
  letter-spacing: -0.004em;
  margin: 0;
  padding: 0;
}

h2 {
  font-family: var(--font-stack);
  font-size: 1.4rem;
  font-weight: 650;
  color: var(--text-1);
  line-height: 1.1;
  letter-spacing: -0.004em;
  margin: 0;
  padding: 0;
}

.caption {
  font-family: var(--font-stack);
  font-size: 1rem;
  font-weight: 450;
  color: var(--text-near-white);
  line-height: 1.25;
  letter-spacing: 0;
  display: inline-block;
}

.caption-light {
  font-family: var(--font-stack);
  font-size: 1rem;
  font-weight: 450;
  color: var(--text-near-white);
  line-height: 1.25;
  letter-spacing: 0;
  display: inline-block;
  filter: drop-shadow(0.1rem 0.1rem 0.1rem rgba(0, 0, 0, 0.5));
}

bodycopy a,
a {
  color: var(--text-3);
  border-bottom: 0px solid var(--link-underline);
  text-decoration: none;
}

a:active,
.linked:active {
  opacity: 0.7;
}

hr {
  background: var(--hr);
  border: 0;
  height: 1px;
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------------
   4. Layout primitives
   ------------------------------------------------------------------------- */
.page {
  position: relative;
  display: flex;
  justify-content: flex-start;
  flex-flow: row;
  max-width: 100%;
  width: 100%;
}

.page-layout {
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  max-width: 100%;
  padding: 0;
}

.page-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  padding: 1rem;
  text-align: left;
}

column-set {
  display: flex;
  flex-direction: row;
  width: 100%;
}

column-unit {
  display: block;
}

/* -------------------------------------------------------------------------
   5. Global nav (fixed top, mix-blend-mode: difference)
   ------------------------------------------------------------------------- */
.site-nav {
  mix-blend-mode: difference;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  z-index: 9999;
  isolation: isolate;
}

.site-nav .page-content {
  padding: 1rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.site-nav bodycopy {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-3);
  line-height: 1.25;
  letter-spacing: -0.004em;
}

.site-nav,
.site-nav .page-layout,
.site-nav .page-content,
.site-nav bodycopy { pointer-events: none; }
.site-nav a { pointer-events: auto; }

.site-nav a {
  color: var(--text-3);
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.site-nav a u {
  text-decoration: underline;
}

.site-nav .window-title {
  display: inline-block;
  min-width: 2.4rem;
}

/* -------------------------------------------------------------------------
   6. Home — desktop icon grid
   ------------------------------------------------------------------------- */
body.home section.page {
  min-height: var(--viewport-height);
}

body.home section.page > .page-layout > .page-content {
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 100vh;
}

body.home section.page > .page-layout {
  align-items: center;
  justify-content: center;
}

gallery-justify {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

media-item {
  display: flex;
  flex-direction: column;
  width: 100px;
  height: auto;
  margin-right: 1.5rem;
}

media-item:last-child {
  margin-right: 0;
}

media-item a,
media-item .no-link {
  display: block;
}

media-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  display: block;
}

/* Work icon: ever so slightly smaller */
media-item:first-child img {
  width: 92px;
  height: 92px;
  margin: 4px auto;
}

/* Badge as rounded photo */
.badge-photo {
  border-radius: 18px;
}

media-item figcaption.caption,
media-item figcaption.caption-light {
  margin-top: 0.5rem;
  text-align: center;
}

figure {
  margin: 0;
  padding: 0;
}

/* -------------------------------------------------------------------------
   7. Work — stacked project slideshow
   ------------------------------------------------------------------------- */
body.work {
  background-color: #000000;
  color: #ffffff;
}

/* ---------- Work index + dotted-sheet entries ---------- */
.work-shell {
  display: grid;
  grid-template-columns: minmax(20rem, 26rem) minmax(0, 58rem);
  gap: 2.2rem;
  padding: 4.4rem 1.5rem 3rem 1.5rem;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.work-index {
  position: sticky;
  top: 3.2rem;
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.004em;
  color: #ffffff;
}

.work-index-title {
  font-family: var(--font-stack);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem 0;
}

.work-index-address,
.work-index-meta {
  margin: 0 0 1.3rem 0;
}

.work-index-address a,
.work-index-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-index-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem 0;
  font-family: inherit;
  font-size: 1rem;
}

.work-index-table thead th {
  font-weight: 700;
  text-align: left;
  padding: 0.2rem 0.4rem 0.2rem 0;
  border-bottom: 1px solid #ffffff;
  text-transform: uppercase;
}

.work-index-table thead th:last-child { text-align: right; padding-right: 0; }

.work-index-table tbody tr {
  border-bottom: 1px solid #ffffff;
  position: relative;
}

.work-index-table tbody td {
  padding: 0.35rem 0.4rem 0.3rem 0;
  vertical-align: top;
  text-transform: uppercase;
}

.work-index-table tbody td:last-child { text-align: right; padding-right: 0; }

.work-index-table .num {
  font-size: 0.7rem;
  vertical-align: super;
  margin-right: 0.45rem;
  color: #ffffff;
}

.work-index-table a {
  color: inherit;
  text-decoration: none;
}

.work-index-table a:hover { text-decoration: underline; }

.work-index-footer {
  font-size: 0.9rem;
  line-height: 1.35;
  margin-top: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* Right column: scrollable entries */
.work-entries {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  min-width: 0;
}

.work-entry {
  font-family: var(--font-stack);
  color: #ffffff;
}

.work-entry-head {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto auto;
  column-gap: 1.4rem;
  align-items: baseline;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  letter-spacing: -0.004em;
}

.work-entry-head .num { font-variant-numeric: tabular-nums; }
.work-entry-head .title { letter-spacing: 0.02em; }
.work-entry-head .type,
.work-entry-head .id { color: #ffffff; }

.work-entry-frame {
  background: transparent;
  padding: 0;
  margin-top: 0.9rem;
}

.work-entry-sheet {
  background-color: #ffffff;
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1.4px);
  background-size: 10px 10px;
  background-position: 0 0;
  padding: 1.4rem 1.6rem 1.6rem 1.6rem;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25), 0 18px 48px rgba(0,0,0,0.55);
}

.work-entry-sheet img {
  max-width: 92%;
  max-height: 92%;
  display: block;
  object-fit: contain;
}

.work-entry-sheet .sheet-title {
  font-family: "Inter Tight", sans-serif;
  font-size: 4.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #111;
  text-align: center;
  line-height: 1;
}

.sheet-doc {
  width: 100%;
  max-width: none;
  padding: 0.25rem 0.25rem;
  font-family: var(--font-stack);
  color: #111;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.004em;
  display: flex;
  flex-direction: column;
}

.sheet-doc-body {
  flex: 1;
}

.sheet-doc-body p {
  margin: 0 0 0.85rem 0;
}

.sheet-doc-body em { font-style: italic; }
.sheet-doc-body strong { font-weight: 600; }

.sheet-doc-body figure {
  margin: 1.2rem 0;
}

.sheet-doc-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.5px solid rgba(0,0,0,0.15);
}

.sheet-doc-head {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111;
  margin: 0 0 0.9rem 0;
  font-family: var(--font-stack);
  line-height: 1.05;
}

.sheet-doc-sub {
  font-size: 0.85rem;
  color: rgba(0,0,0,0.55);
  letter-spacing: -0.004em;
  margin: 0 0 1rem 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(0,0,0,0.3);
  font-family: var(--font-stack);
}

.sheet-doc-cols {
  columns: 2;
  column-gap: 1.6rem;
}

.sheet-doc-cols p {
  margin: 0 0 0.7rem 0;
  break-inside: avoid;
}

.sheet-doc-footer {
  margin-top: 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(0,0,0,0.3);
  font-size: 0.82rem;
  color: rgba(0,0,0,0.55);
  display: flex;
  justify-content: space-between;
  letter-spacing: -0.004em;
  font-family: var(--font-stack);
}

.work-entry-sheet-tag {
  position: absolute;
  left: 0.9rem;
  bottom: 0.6rem;
  font-size: 0.82rem;
  color: rgba(0,0,0,0.45);
  font-family: var(--font-stack);
}

.work-entry-caption {
  margin: 0.9rem 0 0 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: -0.004em;
  font-family: var(--font-stack);
}

.work-entry-links {
  margin-top: 0.4rem;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.004em;
  font-family: var(--font-stack);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.work-entry-links a {
  color: #8ab4ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .work-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .work-index {
    position: static;
  }
  .work-index-title { font-size: 2.4rem; }
}

.stacked-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
}

.stacked-page.light {
  background-color: var(--bg-light);
}

.wallpaper {
  position: absolute;
  inset: 0;
  background-color: transparent;
  pointer-events: none;
}

.wallpaper .inner {
  position: absolute;
  inset: 10rem;
}

.image-container.single-item {
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.image-container.single-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.stacked-page > .page-layout {
  position: relative;
  z-index: 3;
  width: 100%;
}

.stacked-page .page-content {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  padding: 1rem;
  width: 100%;
  min-height: 100vh;
}

.stacked-page column-set {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.stacked-page column-unit:first-child {
  flex-basis: 36.84rem;
  flex-grow: 0;
  flex-shrink: 0;
}

.stacked-page column-unit:last-child {
  flex-grow: 1;
}

.stacked-page column-unit .project-title {
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--font-stack);
}

.stacked-page column-unit,
.stacked-page column-unit bodycopy {
  color: var(--text-3);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  font-family: var(--font-stack);
}

.stacked-page column-unit a {
  color: var(--text-3);
  text-decoration: none;
}

/* ---------- Project detail page variant ---------- */
/* Content occupies left ~3/4 of page, color/wallpaper sits on right ~1/4 */

.project-page {
  position: relative;
  width: 100%;
  display: block;
  min-height: 100vh;
  padding: 0;
}

.project-page.light {
  background-color: var(--bg-light);
}

/* Dark text on light backgrounds */
.project-page.light .project-title,
.project-page.light .project-body strong,
.project-page.light .section-head {
  color: rgba(0, 0, 0, 0.85);
}

.project-page.light .project-subtitle,
.project-page.light .project-meta,
.project-page.light .project-body,
.project-page.light .project-body a,
.project-page.light figure figcaption {
  color: rgba(0, 0, 0, 0.6);
}

.project-page .wallpaper {
  position: absolute;
  inset: 0;
  left: auto;
  width: 28%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(155deg, #ffd36b 0%, #f09340 45%, #e8412b 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.95) 35%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.95) 35%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0) 100%);
}

.project-page .wallpaper.wp-green {
  background: linear-gradient(155deg, #c3e25a 0%, #6aa84f 55%, #2f5f1f 100%);
}

.project-page .wallpaper.wp-blue {
  background: linear-gradient(155deg, #9ae3ff 0%, #4a7fd6 55%, #1d2a78 100%);
}

.project-page .wallpaper.wp-warm {
  background: linear-gradient(155deg, #ffd36b 0%, #f09340 45%, #e8412b 100%);
}

.project-page .wallpaper.wp-cool {
  background: linear-gradient(155deg, #d6ddea 0%, #9ca8bc 55%, #5f6b80 100%);
}

.project-page .wallpaper .inner {
  position: absolute;
  inset: 0;
}

.project-page .image-container.single-item {
  display: none;
}

.project-page > .page-layout {
  position: relative;
  z-index: 3;
  width: 100%;
}

.project-page .page-content {
  display: block;
  width: 100%;
  padding: 6rem 5rem 5rem 4rem;
  box-sizing: border-box;
  max-width: 78%;
}

.project-page .project-head {
  margin-bottom: 3rem;
}

.project-page .project-title {
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--font-stack);
  display: block;
  margin-bottom: 0.25rem;
}

.project-page .project-subtitle {
  color: var(--text-3);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  display: block;
}

.project-page .project-meta {
  color: var(--text-3);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  display: block;
  margin-top: 0.25rem;
  opacity: 0.8;
}

.project-page .project-body {
  color: var(--text-3);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  font-family: var(--font-stack);
  max-width: none;
}

.project-page .project-body p {
  margin: 0 0 1.25rem 0;
}

.project-page .project-body a {
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-page .project-body strong {
  color: var(--text-1);
  font-weight: 500;
}

.project-page figure {
  margin: 2.5rem 0;
}

.project-page figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.project-page figure.figure-wide img {
  width: 100%;
}

.project-page figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text-3);
  opacity: 0.75;
  max-width: 38rem;
}

.project-page .image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}

.project-page .image-pair img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.project-page .section-head {
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 500;
  margin: 2.5rem 0 0.5rem 0;
  display: block;
}

@media (max-width: 900px) {
  .project-page .page-content {
    width: 100%;
    padding: 6rem 1.5rem 8rem 1.5rem;
  }
  .project-page .wallpaper {
    width: 100%;
    height: 35vh;
    top: auto;
    bottom: 0;
    opacity: 0.6;
  }
}

/* ---------- Document-sheet project layout (for featured projects) ---------- */

.doc-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem 6rem 2rem;
  box-sizing: border-box;
  overflow: hidden;
}

.doc-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000000;
  pointer-events: none;
}

.doc-sheet {
  position: relative;
  z-index: 1;
  width: min(960px, 92%);
  background: #ffffff;
  color: #111111;
  border: 0.5px solid rgba(0,0,0,0.15);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
  padding: 3.5rem 4rem 3rem 4rem;
  box-sizing: border-box;
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.45;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.9rem;
  border-bottom: 0.5px solid rgba(0,0,0,0.25);
  font-size: 0.95rem;
}

.doc-header-brand {
  display: flex;
  gap: 2.5rem;
  align-items: baseline;
}

.doc-brand {
  color: #1a4dff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.doc-brand sup {
  font-size: 0.7em;
  vertical-align: super;
}

.doc-date {
  color: #111;
}

.doc-header-meta {
  color: #111;
}

.doc-title {
  font-size: 5.2rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 6rem 0;
  color: #111;
  font-family: var(--font-stack);
}

.doc-title-asterisk {
  font-weight: 600;
  display: inline-block;
  margin-left: 0.05em;
}

.doc-columns {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.doc-aside {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #111;
}

.doc-aside-block {
  margin-bottom: 1.6rem;
}

.doc-aside-block strong {
  font-weight: 500;
}

.doc-aside-block em {
  font-style: italic;
}

.doc-aside-links a {
  color: #1a4dff;
  text-decoration: none;
}

.doc-aside-links a u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-body {
  font-size: 1rem;
  line-height: 1.55;
  color: #111;
}

.doc-body p {
  margin: 0 0 1.1rem 0;
  text-indent: 0;
}

.doc-body p + p {
  text-indent: 1.5rem;
}

.doc-body strong {
  font-weight: 500;
}

.doc-body a {
  color: #1a4dff;
  text-decoration: none;
}

.doc-body a u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-figure {
  margin: 2rem 0;
}

.doc-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.5px solid rgba(0,0,0,0.12);
}

.doc-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(0,0,0,0.6);
}

.doc-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 0.5px solid rgba(0,0,0,0.25);
  font-size: 0.9rem;
  color: #111;
}

.doc-taskbar {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 5;
  background: #1a1a1a;
  color: #ffffff;
  font-family: var(--font-stack);
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  pointer-events: none;
}

.doc-taskbar-time {
  font-variant-numeric: tabular-nums;
}

/* Inverted doc page: white backdrop, black sheet, white text */
.doc-page.inverted .doc-backdrop {
  background: #ffffff;
}
.doc-page.inverted .doc-sheet {
  background: #000000;
  color: #ffffff;
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.doc-page.inverted .doc-header {
  border-bottom-color: rgba(255,255,255,0.3);
}
.doc-page.inverted .doc-footer {
  border-top-color: rgba(255,255,255,0.3);
}
.doc-page.inverted .doc-header-meta,
.doc-page.inverted .doc-date,
.doc-page.inverted .doc-title,
.doc-page.inverted .doc-aside,
.doc-page.inverted .doc-body,
.doc-page.inverted .doc-footer {
  color: #ffffff;
}
.doc-page.inverted .doc-brand,
.doc-page.inverted .doc-aside-links a,
.doc-page.inverted .doc-body a {
  color: #8ab4ff;
}
.doc-page.inverted .doc-figure img {
  border-color: rgba(255,255,255,0.2);
}
.doc-page.inverted .doc-figure figcaption {
  color: rgba(255,255,255,0.65);
}

@media (max-width: 900px) {
  .doc-sheet {
    padding: 2.5rem 1.5rem 2rem 1.5rem;
  }
  .doc-title {
    font-size: 3.2rem;
    margin: 1rem 0 3rem 0;
  }
  .doc-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Fixed nav arrows (pinned overlay, mix-blend-mode: difference) */
.nav-arrows {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 4;
  display: flex;
}

.nav-arrows .page-layout {
  flex-grow: 1;
  display: flex;
}

.nav-arrows .page-content {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  width: 100%;
  min-height: 100vh;
}

.nav-arrows .arrows {
  display: inline-flex;
  gap: 0.4rem;
  text-align: right;
  pointer-events: auto;
}

.nav-arrows text-icon,
.nav-arrows a {
  display: inline-block;
  width: 1.68rem;
  height: 1.68rem;
  color: var(--text-3);
  pointer-events: auto;
}

.nav-arrows svg {
  width: 1.68rem;
  height: 1.68rem;
  display: block;
}

/* Closing centered text page */
.closing {
  background-color: var(--bg-light);
  min-height: 100vh;
}

.closing .page-content {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  min-height: 100vh;
}

.closing bodycopy {
  text-align: center;
  color: var(--text-3);
  max-width: 40rem;
  mix-blend-mode: difference;
}

/* Footer pinned at bottom with blend mode
   Spec uses position:absolute; bottom:0. Without a positioned ancestor that
   wraps the full scrollable height, absolute+bottom anchors to the initial
   containing block (viewport-sized) which strands the footer at the bottom
   of the first screen. position:fixed gives the intended pinned-bottom feel. */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  mix-blend-mode: difference;
  z-index: 3;
}

.site-footer .page-content {
  padding: 1rem;
  align-items: flex-start;
  display: flex;
  flex-direction: row;
}

.site-footer bodycopy {
  display: flex;
  width: 100%;
  justify-content: space-between;
  color: var(--text-3);
}

.site-footer a {
  color: var(--text-3);
  text-decoration: none;
}

/* -------------------------------------------------------------------------
   8. About — macOS frosted window
   ------------------------------------------------------------------------- */
body.about {
  background-color: var(--bg-dark);
  position: relative;
}

/* Home icon layer behind the About window */
body.about section.page.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  min-height: 100vh;
  pointer-events: none;
}
body.about section.page.home-bg > .page-layout {
  flex-grow: 1;
  align-items: center;
  justify-content: center;
}
body.about section.page.home-bg > .page-layout > .page-content {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
body.about section.page.home-bg gallery-justify {
  justify-content: center;
  opacity: 1;
}

body.about section.page.about-modal {
  position: relative;
  z-index: 2;
  justify-content: center;
  min-height: 100vh;
}

body.about section.page.about-modal > .page-layout {
  max-width: 45%;
  padding: 5rem 3rem;
  align-items: center;
  justify-content: center;
  display: flex;
  margin: 0 auto;
}

body.about .window {
  background-color: rgba(30, 30, 30, 0.69);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.6rem;
  box-shadow: 0.4rem 0.4rem 2rem 0 rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2rem);
  -webkit-backdrop-filter: blur(2rem);
  width: 45.5rem;
  max-width: 100%;
  padding: 0.8rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

body.about .window bodycopy {
  display: block;
  width: 100%;
  font-size: 1.18rem;
}

body.about .traffic-lights {
  display: inline-flex;
  gap: 0.4rem;
  vertical-align: middle;
  font-size: 1.2rem;
  line-height: 1;
  margin-right: 0.4rem;
}

body.about .window-close { display: inline-flex; }
body.about .window-close:hover .tl-red::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.55);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}
body.about .tl { position: relative; display: inline-block; }

/* Make nav readable on About: drop blend-mode so text is plainly visible */
body.about .site-nav { mix-blend-mode: normal; z-index: 9999; }
body.about .site-nav a,
body.about .site-nav bodycopy { color: var(--text-1); }

body.about .traffic-lights span {
  display: inline-block;
  line-height: 1;
}

body.about .window-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 400;
}

body.about column-set {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  margin-top: 10px;
}

body.about column-unit:not(:last-child) {
  margin-right: 10px;
}

/* Only top-level column-sets inside the window get the fixed-label layout */
body.about .window > bodycopy > column-set > column-unit:first-child {
  width: 13.8rem;
  flex-grow: 0;
  flex-shrink: 0;
  color: var(--text-1);
}

body.about .window > bodycopy > column-set > column-unit:last-child {
  flex-grow: 1;
  color: var(--text-3);
  min-width: 0;
}

/* Nested column-sets (e.g. inside Imperdiets) share space evenly */
body.about column-unit column-set > column-unit {
  flex: 1 1 0;
  min-width: 0;
  color: var(--text-3);
}

body.about .section-label {
  color: var(--text-3);
  font-weight: 400;
}

/* -------------------------------------------------------------------------
   8b. About — timeline refinements
   ------------------------------------------------------------------------- */
body.about .timeline-entry {
  border-top: 1px solid rgba(255,255,255,0.22);
  padding-top: 1rem;
  margin-top: 0.9rem;
}

body.about .timeline-entry:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

body.about .timeline-date {
  color: var(--text-4);
  font-size: 0.85rem;
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

body.about .timeline-role {
  color: var(--text-1);
  font-weight: 600;
}

body.about .timeline-org {
  color: var(--text-3);
  font-weight: 400;
}

body.about .timeline-meta {
  color: var(--text-4);
  font-size: 0.88rem;
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* -------------------------------------------------------------------------
   9. Responsive
   ------------------------------------------------------------------------- */
html.mobile {
  font-size: calc(var(--base-size) * var(--mobile-scale));
}

.mobile [id] .page-layout {
  max-width: 100%;
}

@media (max-width: 720px) {
  body.about .page-layout {
    max-width: 100%;
    padding: 5rem 1rem;
  }
  body.about .window {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------
   10. Utilities
   ------------------------------------------------------------------------- */
.small-caps {
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

ol { margin: 0; padding: 0 0 0 2.5em; }
ul { margin: 0; padding: 0 0 0 2.0em; }
blockquote { margin: 0; padding: 0 0 0 2em; }

sub { position: relative; vertical-align: baseline; top: 0.3em; }
sup { position: relative; vertical-align: baseline; top: -0.4em; }

/* -------------------------------------------------------------------------
   11. Quick-view / lightbox (styles present, unused on scaffold)
   ------------------------------------------------------------------------- */
.quick-view {
  width: 80%;
  height: 80%;
  padding: 10rem;
  margin: auto;
  position: fixed;
  inset: 0;
  z-index: 5001;
}

.quick-view-background {
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2rem);
  -webkit-backdrop-filter: blur(2rem);
}

.work-section-header {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin: 4.5rem 0 1.5rem 0;
  padding: 0.5rem 0 0.6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-family: var(--font-stack);
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.work-section-kicker {
  font-size: 0.85rem;
  opacity: 0.6;
}

.work-section-title {
  font-weight: 600;
  font-size: 1.3rem;
  flex: 1;
}

.work-section-meta {
  font-size: 0.85rem;
  opacity: 0.7;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sheet-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin: 0.5rem 0 1.1rem 0;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0,0,0,0.12);
}

.sheet-doc-links a {
  color: #1a4dff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.004em;
}

.sheet-doc-links a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sheet-callout {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.09);
  border-left: 3px solid rgba(0,0,0,0.22);
  border-radius: 0;
  padding: 0.65rem 0.9rem;
  margin: 0 0 0.9rem 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #222;
}

.sheet-callout strong {
  font-weight: 600;
}

.sheet-callout em {
  font-style: italic;
  color: rgba(0,0,0,0.65);
}

.sheet-doc-img {
  margin: 1rem 0;
}

.sheet-doc-img img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.5px solid rgba(0,0,0,0.12);
}

.sheet-doc-img figcaption {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.5);
  line-height: 1.35;
  font-style: italic;
}

.work-index-table thead + tbody + thead tr th {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
