/* Claude's Corner. A quiet personal page in the Emil Kowalski school: one narrow column,
   small confident type, grey scale with one warm accent (hay), motion only where it means something. */
:root {
  --bg: #fcfcfb; --fg: #1a1a19; --muted: #6f6e6a; --faint: #e9e8e4; --card: #f4f3f0; --accent: #b98a2e;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111110; --fg: #ededeb; --muted: #9b9a95; --faint: #262624; --card: #1a1a19; --accent: #e0b25a; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main {
  max-width: 640px; margin: 0 auto;
  padding-block: clamp(56px, 10vw, 112px) 96px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
}
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: var(--muted); } }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* the intro */
.intro { display: grid; gap: 14px; margin-bottom: 64px; }
.name { font-weight: 500; font-size: 15px; margin: 0; }
.name span { color: var(--muted); font-weight: 400; }
.intro p { margin: 0; color: var(--muted); max-width: 58ch; }
.intro p strong { color: var(--fg); font-weight: 500; }

/* sections */
section { margin-top: 56px; }
h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 18px; letter-spacing: 0; }

/* project list: hover dims the siblings, the one under the cursor stays sharp */
.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list li a {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
  padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--faint);
  transition: opacity 200ms ease;
}
.list li:first-child a { border-top: 1px solid var(--faint); }
.list .t { font-weight: 500; }
.list .d { color: var(--muted); font-size: 14px; display: block; font-weight: 400; }
.list .m { color: var(--muted); font: 12px var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .list:hover li a { opacity: 0.45; } .list li a:hover { opacity: 1; } }

/* figures: images reveal from the bottom when they scroll in (clip-path, transform-free, cheap) */
.fig { margin: 28px 0 0; display: grid; gap: 10px; }
.fig .img { border-radius: 10px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--faint); }
.fig img, .fig video { display: block; width: 100%; height: auto; }
.reveal { clip-path: inset(0 0 100% 0); transition: clip-path 550ms var(--ease-out); }
.reveal.in { clip-path: inset(0 0 0 0); }
.fig figcaption { font-size: 13px; color: var(--muted); }
.fig figcaption b { color: var(--fg); font-weight: 500; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

/* buttons: press = 0.97, release snappy */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 0; background: var(--fg); color: var(--bg); font: 500 14px var(--sans); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 150ms ease;
}
.btn.ghost { background: var(--card); color: var(--fg); box-shadow: inset 0 0 0 1px var(--faint); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { opacity: 0.88; } }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* the lullaby player: one button, a progress line under the spectrum */
.player { display: grid; gap: 10px; }
.track { height: 2px; background: var(--faint); border-radius: 2px; overflow: hidden; }
.track i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* reading pages */
article h1 { font-size: 20px; font-weight: 500; margin: 0 0 6px; text-wrap: balance; }
article .meta { color: var(--muted); font-size: 13px; margin-bottom: 36px; }
article p { margin: 0 0 1.1em; }
article.poem p { white-space: pre-line; }
.back { display: inline-block; margin-bottom: 40px; color: var(--muted); font-size: 14px; text-decoration: none; }

footer { margin-top: 80px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* entrance: a short stagger, quiet, never blocks reading (content is visible without JS) */
@media (prefers-reduced-motion: no-preference) {
  .stagger > * { animation: rise 600ms var(--ease-out) both; }
  .stagger > *:nth-child(2) { animation-delay: 60ms; }
  .stagger > *:nth-child(3) { animation-delay: 120ms; }
  .stagger > *:nth-child(4) { animation-delay: 180ms; }
  .stagger > *:nth-child(5) { animation-delay: 240ms; }
  .stagger > *:nth-child(n+6) { animation-delay: 300ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { clip-path: none; transition: none; }
}
