:root {
  color-scheme: dark;
  --bg: #0d0d0c;
  --panel: #171716;
  --text: #ebe8e1;
  --dim: #a39f96;
  --line: #2a2927;
  --accent: #de9155;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--bg); color: var(--dim); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; overflow-x: hidden; }
a { color: var(--text); text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; background: var(--accent); color: #000; padding: .5rem 1rem; font-size: 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }

/* Light that follows the pointer across the page */
.light { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(600px circle at var(--x, 50%) var(--y, 20%), rgba(222, 145, 85, .07), transparent 45%); transition: background .2s linear; }

.wrap { position: relative; z-index: 1; width: min(100% - 2rem, 80rem); margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 0 4rem; }
@media (min-width: 64rem) { .wrap { width: min(100% - 6rem, 80rem); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* Fixed identity column */
.id { padding: 4rem 0 2rem; }
@media (min-width: 64rem) { .id { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 6rem 0 4rem; } }
.id h1 { margin: 0; color: var(--text); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.02em; font-weight: 700; }
.id .role { margin: .6rem 0 0; color: var(--text); font-size: 1.3rem; font-weight: 500; }
.id .intro { margin: 1rem 0 0; max-width: 22rem; }
.spy { list-style: none; margin: 3.5rem 0 0; padding: 0; display: none; }
@media (min-width: 64rem) { .spy { display: block; } }
.spy a { display: inline-flex; align-items: center; gap: 1rem; padding: .45rem 0; color: var(--dim); font-size: 1rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: color .3s var(--ease); }
.spy a::before { content: ""; width: 2rem; height: 1px; background: currentColor; transition: width .35s var(--ease), background .3s var(--ease); }
.spy a:hover, .spy a.on { color: var(--text); }
.spy a:hover::before, .spy a.on::before { width: 4rem; background: var(--text); }
.id-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: 2rem; font-size: 1rem; }
.id-foot a { color: var(--dim); transition: color .25s var(--ease); }
.id-foot a:hover { color: var(--accent); }

/* Scrolling column */
.main { padding: 2rem 0 6rem; min-width: 0; }
@media (min-width: 64rem) { .main { padding-top: 6rem; } }
.sec { margin-bottom: 6rem; }
.sec-h { position: sticky; top: 0; z-index: 5; margin: 0 -1rem 1.5rem; padding: 1rem; background: rgba(13, 13, 12, .78); backdrop-filter: blur(8px); color: var(--text); font-size: 1rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
@media (min-width: 64rem) { .sec-h { position: static; background: none; backdrop-filter: none; padding: 0; margin: 0 0 1.5rem; clip-path: inset(50%); height: 1px; overflow: hidden; } }
.about p { margin: 0 0 1rem; }
.about b { color: var(--text); font-weight: 600; }

/* Rows that dim their siblings */
.rows { list-style: none; margin: 0; padding: 0; }
.rows:hover .row { opacity: .5; }
.rows .row:hover, .rows .row:focus-within { opacity: 1; }
.row { position: relative; display: grid; grid-template-columns: 1fr; gap: .5rem 1.5rem; padding: 1.25rem; margin: 0 -1.25rem .5rem; border-radius: 10px; transition: background .3s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease); }
@media (max-width: 39.99rem) { .row { padding: 1rem; margin-inline: -1rem; } }
@media (min-width: 40rem) { .row { grid-template-columns: 9.5rem minmax(0, 1fr); } }
.row:hover { background: rgba(255, 255, 255, .035); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.row .when { font-size: 1rem; font-weight: 600; letter-spacing: .04em; color: var(--dim); padding-top: .15rem; }
.row .thumb { border: 2px solid var(--line); border-radius: 6px; overflow: hidden; transition: border-color .3s var(--ease); }
.row:hover .thumb { border-color: var(--dim); }
.row h3 { margin: 0; font-size: 1.15rem; line-height: 1.35; color: var(--text); font-weight: 600; }
.row h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.row h3 .arrow { display: inline-block; margin-left: .3rem; transition: transform .3s var(--ease); }
.row:hover h3 { color: var(--accent); }
.row:hover h3 .arrow { transform: translate(3px, -3px); }
.row p { margin: .4rem 0 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 0; padding: 0; }
.chips li { background: rgba(222, 145, 85, .12); color: var(--accent); border-radius: 999px; padding: .1rem .75rem; font-size: 1rem; font-weight: 600; }
.more { display: inline-flex; gap: .4rem; margin-top: 1rem; color: var(--text); font-weight: 700; border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color .25s var(--ease), gap .25s var(--ease); }
.more:hover { color: var(--accent); gap: .7rem; }

/* Live tools */
.live { display: grid; gap: 1.5rem; }
.tool { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.tool:hover { border-color: #444; }
.tool-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; padding: .8rem 1rem; }
.tool-bar b { color: var(--text); font-size: 1.1rem; }
.tool-bar a { font-size: 1rem; color: var(--accent); }
.tool p { margin: 0; padding: 0 1rem .8rem; font-size: 1rem; }
.tool iframe { display: block; width: 100%; height: 30rem; border: 0; border-top: 1px solid var(--line); background: #fff; }

/* Timeline of years */
.tl { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.tl li { position: relative; display: grid; grid-template-columns: 1fr; gap: 0 1rem; padding: .5rem 0 .9rem 1.4rem; }
@media (min-width: 40rem) { .tl li { grid-template-columns: 13rem minmax(0, 1fr); } }
.tl li::before { content: ""; position: absolute; left: -.33rem; top: 1rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl .yr { font-weight: 600; color: var(--text); }
.tl a { transition: color .25s var(--ease); }
.tl a:hover { color: var(--accent); }

.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nums div { border-top: 1px solid var(--line); padding-top: .8rem; }
.nums b { display: block; color: var(--text); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.1; }

.form { display: grid; gap: .9rem; margin-top: 1.5rem; }
.form label { display: grid; gap: .3rem; font-size: 1rem; font-weight: 600; color: var(--text); }
.form input, .form textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .85rem; font-size: 1.0625rem; transition: border-color .25s var(--ease); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { min-height: 8rem; resize: vertical; }
.btn { justify-self: start; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: .75rem 1.3rem; font-weight: 700; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.btn:hover { background: rgba(222, 145, 85, .12); }
.fine { font-size: 1rem; margin-top: 3rem; }

/* Scroll reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .light { display: none; }
}
