/* arlofishman.com — shared styles
   Theme is chosen per page with <body data-theme="dark|music|light">. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --measure: 65ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --nav-h: 4.25rem;
}

/* ---- themes ---------------------------------------------------------- */
body[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-2: #151517;
  --fg: #f2f2f0;
  --muted: #9a9a98;
  --accent: #57f3a6;          /* plasma green */
  --accent-ink: #062;
  --rule: #26262a;
  color-scheme: dark;
}
body[data-theme="music"] {
  --bg: #2e2e31;              /* neutral grey (Arlo, 2026-09-06; was near-black #0e0b10) */
  --bg-2: #3a3a3e;
  --fg: #f4efe9;
  --muted: #b3aca6;
  --accent: #ff9a4d;          /* warm amber */
  --accent-ink: #3a1e00;
  --rule: #48484d;
  color-scheme: dark;
}
body[data-theme="light"] {
  --bg: #eceae5;              /* light grey page; the nav stays white (Arlo, 2026-09-11) */
  --nav-bg: #fff;
  --bg-2: #f1efe9;
  --fg: #171716;
  --muted: #6b6a66;
  --accent: #0b5fbf;          /* restrained blue */
  --accent-ink: #fff;
  --rule: #dedbd2;
  color-scheme: light;
}

/* ---- base ------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: 1.1rem; font-weight: 500; margin-top: 2.5rem; } /* small section labels (Links, Projects) */
h3 { font-size: 1.15rem; margin-top: 1.75rem; }
p { margin: 0 0 1em; }
hr { border: 0; margin: 2.5rem 0; }   /* invisible spacer — Arlo dropped the divider lines 2026-09-09; header/footer rules stay */
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.prose { max-width: var(--measure); }
main { flex: 1; padding-block: 2rem 4rem; }
body.framed { height: 100dvh; overflow: hidden; }          /* /tech/ansipants-web/: header + full-height iframe, no footer */
.frame { padding: 0; display: flex; min-height: 0; }
.frame iframe { flex: 1; width: 100%; border: 0; min-height: 0; }

/* ---- nav ------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg, color-mix(in srgb, var(--bg) 88%, transparent));
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--nav-h); gap: 1rem; padding-block: 0.35rem;
}
.nav .brand {
  text-decoration: none; font-weight: 600; letter-spacing: 0.01em;
  white-space: nowrap; font-size: clamp(1.4rem, 3vw, 1.9rem);
}
.nav .brand:hover { color: var(--fg); }
.tabs { display: flex; gap: clamp(0.75rem, 3vw, 2rem); margin: 0; padding: 0; list-style: none; }
.tabs a {
  display: block; padding: 0.35rem 0 0.1rem; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: clamp(1.4rem, 3vw, 1.9rem); text-transform: lowercase;
}
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* ---- footer ---------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2rem; color: var(--muted); font-size: 0.9rem;
}
.footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.footer a { text-decoration: none; }

/* ---- bio (page retired 2026-09-05, kept for its return) -------------- */
.hero { padding-block: 0 2rem; }
main:has(.hero) { padding-top: 0.75rem; }
.hero-portrait { width: min(100%, 40rem); margin-block: 1rem 1.5rem; margin-inline: auto; }
.hero .prose { margin-inline: auto; text-align: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 400; letter-spacing: 0; color: var(--muted); max-width: 60ch; margin: 0; }

/* ---- art gallery ----------------------------------------------------- */
.feature { margin: 2rem 0 2.5rem; }
.feature img { width: 100%; border-radius: 4px; }
.feature figcaption { margin-top: 0.5rem; font-size: 0.9rem; display: none; /* title/media text hidden for now */ }

.grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  margin: 0; padding: 0; list-style: none;
}
.grid li { margin: 0; }
.grid li[hidden] { display: none; }
.grid a { display: block; background: transparent; border-radius: 4px; overflow: hidden; text-decoration: none; }
.grid figure { margin: 0; }
.grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; transition: opacity 0.2s; } /* whole image, no crop */
.grid a:hover img { opacity: 0.85; }
.grid figcaption { display: none; /* title/media text hidden for now */ }
.grid figcaption b { color: var(--fg); font-weight: 500; }

/* lightbox */
.lb {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(0,0,0,0.94); color: #fff;
  align-items: center; justify-content: center; flex-direction: column;
  padding: 1rem;
}
.lb[open] { display: flex; }
.lb img { max-width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; }
.lb figcaption { margin-top: 0.75rem; text-align: center; color: #ccc; font-size: 0.95rem; display: none; /* title/media text hidden for now */ }
.lb button {
  position: absolute; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 2rem; line-height: 1; cursor: pointer;
  color: #fff; background: rgba(255,255,255,0.08); border: 0; border-radius: 999px;
  width: 3rem; height: 3rem;
}
.lb button:hover { background: rgba(255,255,255,0.2); }
.lb .lb-prev { left: 0.75rem; } .lb .lb-next { right: 0.75rem; }
.lb .lb-close { top: 0.75rem; right: 0.75rem; transform: none; font-size: 1.5rem; }
@media (max-width: 600px) { .lb .lb-prev, .lb .lb-next { display: none; } }

.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { margin-bottom: 0.4rem; }

/* ---- music ----------------------------------------------------------- */
.releases { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-block: 2rem; }
@media (min-width: 760px) { .releases { grid-template-columns: 1fr 1fr; } } /* 2-up; four players make a 2x2 */
.release { display: grid; gap: 0.75rem; }
.release > div:not(.embed) { display: none; /* title + SoundCloud link hidden for now — the player shows them */ }
.embed { aspect-ratio: 16 / 9; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.embed iframe { width: 100%; height: 100%; border: 0; }
.embed--audio { aspect-ratio: auto; min-height: 7.5rem; }

/* ---- tech / editorial ------------------------------------------------ */
body[data-theme="light"] h2 { border-bottom: 1px solid var(--rule); padding-bottom: 0.3em; }
.projects { display: grid; align-items: start; gap: 3rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.project { font-family: var(--font-sans); font-size: 0.98rem; }   /* no card chrome: image + text run to the .wrap edges (Arlo, 2026-09-09) */
.project h3 { margin-top: 0; }
.project img { display: block; width: 100%; border-radius: 4px; margin-bottom: 0.75rem; border: 1px solid var(--rule); }
.project ul { padding-left: 1.25rem; }
.project li { margin-bottom: 0.25rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid img { transition: none; }
}
