/* ---------- tokens ---------- */
:root {
  --bg: #f4f2ee;
  --fg: #141413;
  --muted: #8a877f;
  --line: #d9d5cc;
  --accent: #c2410c;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 64rem;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f0f0e; --fg: #ecebe6; --muted: #7d7a73; --line: #2a2926; --accent: #f97316; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header / footer ---------- */
.site-header { padding: 1.75rem 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.brand { font-weight: 500; letter-spacing: -0.01em; }
.brand::before { content: "●"; color: var(--accent); margin-right: 0.5rem; font-size: 0.6rem; vertical-align: 0.15em; }
.crumbs { color: var(--muted); }
.crumbs a:hover { color: var(--fg); }

main { flex: 1; }
.site-footer { padding: 2rem 0; color: var(--muted); font-size: 0.75rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- type ---------- */
.label { color: var(--muted); font-size: 0.75rem; text-transform: lowercase; letter-spacing: 0.04em; }
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
}
.display em { color: var(--muted); }
.lede { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.35; max-width: 34ch; margin: 1.5rem 0 0; }
.page-head { padding: 4rem 0 3rem; border-bottom: 1px solid var(--line); }
section.block { padding: 3rem 0; border-bottom: 1px solid var(--line); }
section.block:last-child { border-bottom: 0; }
.arrow-link { display: inline-flex; gap: 0.5rem; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.arrow-link:hover { border-color: var(--accent); color: var(--accent); }
.arrow-link::after { content: "↗"; }

/* ---------- landing roadmap ---------- */
.hero { padding: 5rem 0 3rem; }
.roadmap { list-style: none; margin: 0; padding: 0 0 4rem; border-top: 1px solid var(--line); counter-reset: r; }
.roadmap li { border-bottom: 1px solid var(--line); }
.roadmap a {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.35rem 0;
  transition: padding .35s cubic-bezier(.2,.7,.2,1);
}
.roadmap .num { color: var(--muted); font-size: 0.75rem; }
.roadmap .name { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1; letter-spacing: -0.01em; }
.roadmap .desc { color: var(--muted); text-align: right; font-size: 0.75rem; opacity: .7; transition: opacity .3s, color .3s; }
.roadmap a:hover { padding-left: 1rem; }
.roadmap a:hover .num, .roadmap a:hover .desc { color: var(--accent); opacity: 1; }
.roadmap a:hover .name { font-style: italic; }
@media (max-width: 40rem) {
  .roadmap a { grid-template-columns: 2.25rem 1fr; }
  .roadmap .desc { grid-column: 2; text-align: left; }
}

/* ---------- about ---------- */
.cv { display: grid; grid-template-columns: 10rem 1fr; gap: 0.5rem 2rem; margin: 0; }
.cv dt { color: var(--muted); }
.cv dd { margin: 0 0 1.25rem; }
.cv dd strong { font-weight: 500; }
.cv dd span { color: var(--muted); display: block; }
@media (max-width: 40rem) { .cv { grid-template-columns: 1fr; } .cv dd { margin-bottom: 1.5rem; } }
.prose { font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; max-width: 38ch; margin: 0; }

/* ---------- photography ---------- */
.tabs { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.tabs button {
  font: inherit; color: var(--muted); background: none; border: 0; padding: 0 0 4px; cursor: pointer;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--fg); border-color: var(--accent); }
.carousel { position: relative; }
.carousel-frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); }
.carousel-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.02); transition: opacity .7s ease, transform 1.2s ease;
}
.carousel-frame img.active { opacity: 1; transform: none; }
.carousel-bar { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; gap: 1rem; }
.carousel-bar .caption { color: var(--muted); }
.carousel-controls { display: flex; gap: 0.25rem; align-items: center; }
.carousel-controls button {
  font: inherit; color: var(--fg); background: none; border: 1px solid var(--line);
  width: 2.5rem; height: 2.5rem; cursor: pointer; transition: border-color .2s, color .2s;
}
.carousel-controls button:hover { border-color: var(--accent); color: var(--accent); }
.carousel-controls .count { min-width: 4.5rem; text-align: center; color: var(--muted); }

/* ---------- writing ---------- */
.sample {
  border: 1px solid var(--line); padding: 2.5rem; position: relative;
}
.sample blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; transition: opacity .3s; }
.sample blockquote.fade { opacity: 0; }
.sample .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; gap: 1rem; flex-wrap: wrap; }
.btn {
  font: inherit; color: var(--fg); background: none; border: 1px solid var(--fg); padding: 0.6rem 1rem; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- more ---------- */
.submenu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.submenu li { border-bottom: 1px solid var(--line); }
.submenu a { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; transition: color .2s, padding .3s; }
.submenu a:hover { color: var(--accent); padding-left: 0.75rem; }
.submenu .note { color: var(--muted); }
.submenu-group + .submenu-group { margin-top: 3rem; }
.submenu-group h2 { font-weight: 400; font-size: 0.75rem; color: var(--muted); margin: 0 0 1rem; }

/* ---------- redirect page ---------- */
.redirect { padding: 6rem 0; }

/* ---------- entry animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .roadmap li { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .roadmap li:nth-child(1) { animation-delay: .10s; }
  .roadmap li:nth-child(2) { animation-delay: .16s; }
  .roadmap li:nth-child(3) { animation-delay: .22s; }
  .roadmap li:nth-child(4) { animation-delay: .28s; }
  .roadmap li:nth-child(5) { animation-delay: .34s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
