:root {
  --bg: #050505; --dark: #4a4642; --mid: #5a5550; --lit: #e9e2d6; --accent: #c98a34;
  --serif: "Cormorant Garamond", Georgia, serif; --head: var(--serif);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100dvh; overflow: hidden; background: var(--bg); color: var(--mid); }
body { font: 400 15px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }

#dots { contain: strict; position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.stage { position: relative; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 24px; text-align: center; pointer-events: none; }
.stage > * { pointer-events: auto; position: relative; }
.stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(1100px, 130vw); height: 520px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(0,0,0,.96) 0, rgba(0,0,0,.88) 55%, rgba(0,0,0,0) 100%); pointer-events: none; }
.name { font: 700 clamp(52px, 13vw, 168px)/.9 var(--head); letter-spacing: -.02em; color: var(--dark); transition: color .5s ease; cursor: default; }
.name:hover, .name:focus-visible, .name.lit { color: #a89f92; }
.menu { display: flex; gap: clamp(18px, 4vw, 44px); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.menu a { color: var(--mid); text-decoration: none; padding: 8px 2px; transition: color .3s; }
.menu a:hover, .menu a:focus-visible { color: var(--lit); }

.panel { overscroll-behavior: contain; will-change: opacity; position: fixed; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,5,5,.86); opacity: 0; transition: opacity .2s ease-out; }
.panel.open { opacity: 1; }
.panel[hidden] { display: none; }
.panel-inner { width: min(860px, 100%); max-height: 75vh; max-height: 75dvh; overflow-y: auto; overscroll-behavior: contain; background: #0b0b0a; border: 1px solid #1d1c1a; padding: clamp(22px, 4vw, 40px); }
.panel header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.panel h2 { font: 600 34px/1 var(--serif); color: var(--lit); letter-spacing: -.02em; }
.close { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 6px; }
.close:hover, .close:focus-visible { color: var(--lit); }
.panel p { margin-top: 10px; }
.panel a:hover { color: var(--lit); }
.lead h3 { font: 600 24px var(--serif); color: var(--lit); }
.lead h3 span { font: 400 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-left: 8px; }
.stats b { color: var(--lit); font-weight: 500; }
.ph { color: #6e5a3c; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .panel,   .name, .menu a { transition: none; }
}

.projects { list-style: none; }
.row { display: grid; grid-template-columns: 120px 90px 1fr; gap: 6px 18px; align-items: start; padding: 14px 0; border-bottom: 1px solid #1d1c1a; font-size: 13px; }
.p-name { color: #b8b0a4; font-weight: 500; }
.lead .p-name:not(.p-name-link) { color: var(--lit); }
.p-desc { color: #8a837a; }
.p-year { color: #45413c; }
.row.head { padding: 0 0 6px; border-bottom: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #45413c; }
@media (max-width: 640px) { .row.head { display: none; } }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr auto; }
  .p-year { grid-row: 1; grid-column: 2; text-align: right; }
  .p-desc { grid-column: 1 / -1; }
}
.panel-inner::-webkit-scrollbar { width: 8px; }
.panel-inner::-webkit-scrollbar-track { background: #0b0b0a; }
.panel-inner::-webkit-scrollbar-thumb { background: #4a4642; border-radius: 4px; }
@supports not selector(::-webkit-scrollbar) { .panel-inner { scrollbar-width: thin; scrollbar-color: #4a4642 #0b0b0a; } }
.p-name-link { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s, text-decoration-color .2s; }
.p-name-link:hover, .p-name-link:focus-visible { color: var(--lit); text-decoration-color: var(--lit); }
.about-text { color: #a39b90; font-size: 15px; line-height: 1.8; }
.about-text p + p { margin-top: 1.1em; }
.about-text a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.about-text a:hover, .about-text a:focus-visible { color: var(--lit); text-decoration-color: var(--lit); }
.links { list-style: none; display: grid; gap: 4px; }
.links a { display: inline-flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 17px; color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; word-break: break-word; }
.links a:hover, .links a:focus-visible { color: var(--lit); text-decoration-color: var(--lit); }
.ico { width: 22px; height: 22px; flex: none; }
@media (max-width: 640px) { .close { font-size: 0; padding: 8px 12px; } .close::before { content: "\00d7"; font-size: 26px; line-height: 1; letter-spacing: 0; } }
