/* Studio Quire. Look: Sojourn's glass (see CLAUDE.md > Look): clear white glass, slate ink and one accent, both
   taken from the light behind the glass (Scry's aura in its Moonstone tint). */

@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("/fonts/archivo/archivo-light.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/archivo/archivo-regular.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --f-display: "Archivo", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  /* Moonstone, as in Scry: a cool slate ink and a periwinkle-blue accent; text >= 4.5:1 on the base and both glows */
  --ink: #283449; --dim: #434d63; --faint: #4f596f;
  --accent: #36578f; --accent-deep: #2b4775; --focus: #3b5fa0; --accent-rgb: 54, 87, 143;
  /* the light behind when there's no WebGL (light.js and light-variants.js draw it otherwise): a pale sky going to pearl, with soft glows */
  --sky: linear-gradient(180deg, #e9eff9 0%, #f1f4f9 50%, #f4f2fa 100%);
  --glows:
    radial-gradient(45% 38% at 18% 14%, rgba(196, 214, 246, .8), rgba(196, 214, 246, 0) 70%),
    radial-gradient(42% 40% at 86% 70%, rgba(220, 207, 245, .75), rgba(220, 207, 245, 0) 70%),
    radial-gradient(30% 26% at 60% 30%, rgba(251, 252, 255, .8), rgba(251, 252, 255, 0) 70%);
  /* glass */
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .78);
  --glass-edge: rgba(255, 255, 255, .85);
  --glass-line: rgba(40, 52, 73, .1);
  --glass-drop: rgba(36, 50, 80, .2);
  --frost: blur(14px) saturate(140%);
  --well: rgba(40, 52, 73, .07); --well-in: rgba(36, 48, 72, .16);
}

@media (prefers-color-scheme: dark) {
  /* night glass: faint light lifted off a dark sky rather than white sheets */
  :root {
    --ink: #e8eaf1; --dim: #c3c9d6; --faint: #b4bbca;
    --accent: #a4bdec; --accent-deep: #bccff3; --focus: #a4bdec; --accent-rgb: 164, 189, 236;
    --sky: linear-gradient(180deg, #0a0e16 0%, #0d111c 50%, #110f1d 100%);
    --glows:
      radial-gradient(45% 38% at 18% 14%, rgba(24, 35, 59, .9), rgba(24, 35, 59, 0) 70%),
      radial-gradient(42% 40% at 86% 70%, rgba(29, 26, 54, .9), rgba(29, 26, 54, 0) 70%),
      radial-gradient(30% 26% at 60% 30%, rgba(44, 58, 88, .6), rgba(44, 58, 88, 0) 70%);
    --glass: rgba(255, 255, 255, .07);
    --glass-strong: rgba(255, 255, 255, .12);
    --glass-edge: rgba(255, 255, 255, .16);
    --glass-line: rgba(255, 255, 255, .1);
    --glass-drop: rgba(0, 0, 0, .5);
    --well: rgba(0, 0, 0, .25); --well-in: rgba(0, 0, 0, .45);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--f); font-size: 1rem; line-height: 1.6;
  color: var(--ink); background: #f1f4f9;
  position: relative;
}
@media (prefers-color-scheme: dark) { body { background: #0a0e16; } }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: var(--glows), var(--sky); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 1rem; top: -4rem; padding: .5rem 1rem; border-radius: 999px; background: #fff; color: #283449; z-index: 10; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.page { flex: 1 0 auto; }
#light { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
html:not(.lit) #light { display: none; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 1px 2px rgba(36, 50, 80, .06), 0 14px 32px -18px var(--glass-drop);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}
.card { padding: 1.1rem 1.3rem; }

/* ---------- header and footer ---------- */
.site-head { padding: 1.25rem 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; padding: .25rem .5rem .25rem 0; }
.brand:hover { color: var(--ink); }
.brand svg { width: 1.9rem; height: 1.9rem; flex: none; }
.brand-name { font-family: var(--f-display); font-size: 1.125rem; font-weight: 300; letter-spacing: .04em; }
.site-nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.site-nav a { color: var(--dim); text-decoration: none; font-size: .9375rem; padding: .3rem 0; display: inline-block; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }

/* the footer: a thin full-width strip of the same glass as the cards, at the foot of the window or of the content */
.site-foot { margin-top: 3rem; padding: .6rem 0; font-size: .8125rem; color: var(--dim);
  background: var(--glass); -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border-top: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-edge); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 2rem; }
.site-foot p { margin: 0; }
.foot-name { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); }
.foot-name svg { width: 1.1rem; height: 1.1rem; flex: none; }
@media (min-width: 52rem) { .site-foot p:last-child { margin-left: auto; } }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--f-display); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 300; letter-spacing: -.005em; }
h2 { font-size: 1.25rem; margin: 0 0 .5rem; font-weight: 400; }
h3, h4 { font-size: 1.1875rem; font-weight: 400; }
h4 { font-family: var(--f-display); line-height: 1.2; margin: 0; }
p, ul, ol { margin: .6rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: .25rem 0; }
li::marker { color: var(--faint); }
.lede { font-size: 1.125rem; line-height: 1.5; color: var(--dim); margin-top: .6rem; max-width: 36rem; }
.small { font-size: .875rem; color: var(--faint); }
.label { font-size: .8125rem; font-weight: 600; color: var(--dim); }

main { padding-top: 2.25rem; }

/* ---------- page layout: a top row, then sections in columns ---------- */
.top { display: grid; gap: 1.75rem; align-items: start; }
.sections { display: grid; gap: 1.75rem; margin-top: 2.5rem; }
.sections > section > :last-child { margin-bottom: 0; }
.credit { grid-column: 1 / -1; color: var(--faint); font-size: .875rem; margin-top: .5rem; }
.credit p { margin: .3rem 0; max-width: 52rem; }
@media (min-width: 52rem) {
  .top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }
  .sections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
}

/* ---------- the home page ---------- */
.intro .name-note { margin-top: .9rem; max-width: 36rem; color: var(--faint); font-size: .9375rem; }
.home-projects { margin-top: 2.5rem; }
.group { margin-top: 1rem; }
.group + .group { margin-top: 1.75rem; }
.group-note { margin: .2rem 0 0; max-width: 40rem; color: var(--dim); font-size: .9375rem; }
.home-projects + .home-projects { margin-top: 3rem; }
.group > h3 { font-family: var(--f); font-size: .875rem; font-weight: 600; color: var(--dim); }
.projects { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.project { position: relative; padding: 1.1rem 1.25rem 1rem; margin: 0; display: flex; flex-direction: column; }
.project :is(h3, h4) { font-family: var(--f-display); font-size: 1.1875rem; font-weight: 400; line-height: 1.2; margin: 0; }
.project :is(h3, h4) a { color: var(--ink); text-decoration: none; }
.project :is(h3, h4) a::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.project :is(h3, h4) a:focus-visible { outline: none; }
.project:has(:is(h3, h4) a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.project:has(:is(h3, h4) a):hover { background: var(--glass-strong); }
.project :is(h3, h4) a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.project p { margin: .35rem 0 0; color: var(--dim); font-size: .9375rem; }
.project .state { display: inline-flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: .8rem; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; flex: none; display: inline-block; background: #93a5a9; box-shadow: 0 0 0 2px rgba(147, 165, 169, .22); }
.dot.out { background: #2a9a8c; box-shadow: 0 0 0 2px rgba(42, 154, 140, .22); }
.dot.coming { background: #6e96d6; box-shadow: 0 0 0 2px rgba(110, 150, 214, .22); }

/* ---------- a project's page ---------- */
.get { margin: 1.4rem 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 2.5rem; padding: .4rem 1.1rem; border-radius: 999px;
  font: inherit; font-size: .9375rem; font-weight: 600; text-decoration: none;
  color: var(--ink); background: var(--glass-strong);
  -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 4px 12px -6px var(--glass-drop);
}
.btn:hover { color: var(--ink); background: #fff; }
@media (prefers-color-scheme: dark) { .btn:hover { background: rgba(255, 255, 255, .2); } }
/* the action: a clear lens of light, the accent at its rim and its glyph, the brightest thing on the page */
.btn.primary {
  min-height: 3.1rem; padding: .55rem 1.6rem .55rem .6rem; gap: .75rem; font-size: 1.0625rem;
  color: var(--accent-deep);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 247, 253, .86));
  border: 1px solid rgba(var(--accent-rgb), .38);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 6px rgba(var(--accent-rgb), .1), 0 0 0 4px rgba(var(--accent-rgb), .08), 0 12px 26px -10px rgba(var(--accent-rgb), .45);
}
.btn.primary:hover { color: var(--accent-deep); background: #fff; box-shadow: inset 0 1px 0 #fff, 0 0 0 5px rgba(var(--accent-rgb), .13), 0 14px 28px -10px rgba(var(--accent-rgb), .5); }
.btn.primary .glyph { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff;
  background: radial-gradient(120% 120% at 35% 20%, #7e9bd2, #36578f 60%, #2b4775); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary .glyph svg { width: 1.15rem; height: 1.15rem; }
@media (prefers-color-scheme: dark) {
  .btn.primary { color: #eef3fd; background: linear-gradient(180deg, rgba(var(--accent-rgb), .26), rgba(var(--accent-rgb), .14));
    border-color: rgba(var(--accent-rgb), .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 4px rgba(var(--accent-rgb), .1), 0 12px 26px -10px rgba(0, 0, 0, .6); }
  .btn.primary:hover { color: #fff; background: rgba(var(--accent-rgb), .32); }
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn:active { filter: brightness(.97); }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .15s cubic-bezier(.3, .7, .3, 1), background-color .15s, box-shadow .15s; }
  .btn:active { transform: scale(.98); }
}
.get .small { margin: .55rem 0 0; }

/* not out yet: set into the surface, not raised, so it doesn't read as pressable */
.status { display: inline-flex; align-items: center; gap: .65rem; min-height: 3.1rem; padding: .6rem 1.5rem .6rem 1.2rem; border-radius: 999px; margin: 0;
  background: var(--well); box-shadow: inset 0 1px 3px var(--well-in); font-size: 1.0625rem; color: var(--ink); }
.status .dot { width: .7rem; height: .7rem; }

.steps { padding-left: 1.5rem; }
.steps li { padding-left: .15rem; }
kbd { font: inherit; font-size: .9em; font-weight: 600; padding: .02em .45em; border-radius: 6px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: 0 1px 0 var(--glass-line); white-space: nowrap; }
.keys { list-style: none; padding: 0; }
.keys li { margin: .3rem 0; }

.shot { margin: 0; padding: .5rem; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; }
.status-line { display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 600; color: var(--dim); }
.shot.portrait { max-width: 26rem; justify-self: center; }
.shot figcaption { margin: .5rem .35rem .15rem; font-size: .875rem; color: var(--faint); }

.links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.links li { margin: 0; }

@media (max-width: 30rem) {
  main { padding-top: 1.75rem; }
  .btn.primary, .status { width: 100%; }
  .project { padding: 1rem 1.1rem; }
}

@media (max-width: 40rem), (pointer: coarse) {
  .glass, .btn { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass, .site-foot { background: rgba(255, 255, 255, .7); }
  .site-foot { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 40rem) and (prefers-color-scheme: dark), (pointer: coarse) and (prefers-color-scheme: dark) {
  .glass, .site-foot { background: rgba(255, 255, 255, .1); }
}

@media (forced-colors: active) {
  .btn, .status, .glass { border: 1px solid CanvasText; }
  .dot { forced-color-adjust: none; }
}

h2.later { margin-top: 1.75rem; }
