@font-face { font-family: "Quicksand"; src: url("assets/quicksand.ttf"); font-weight: 300 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fbfbf9;
  --side: #f1f1ee;
  --card: #ffffff;
  --text: #161616;
  --text-2: #474745;
  --text-3: #666662;
  --line: #e1e1dc;
  --line-2: #c6c6c0;
  --accent: #b53618;
  --accent-bg: #f7e4de;
  --hover: #e7e7e3;
  --sel: #deded9;
  --radius: 10px;
  --side-w: 270px;
  --font: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151515;
  --side: #1c1c1c;
  --card: #232323;
  --text: #efefec;
  --text-2: #bdbdb8;
  --text-3: #969691;
  --line: #333332;
  --line-2: #4a4a48;
  --accent: #ff8261;
  --accent-bg: #3d2620;
  --hover: #282828;
  --sel: #343433;
}
/* Thin light-on-dark text looks fainter, so body text goes one step heavier. */
:root[data-theme="dark"] body { font-weight: 400; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 350 17.5px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100%; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side); border-right: 1px solid var(--line);
  padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 18px;
}
.id { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
/* Blend modes hide the white backing in logo.png against either sidebar colour. */
.logo { flex: none; width: 40px; height: 43px; margin: 0 6px 0 8px; object-fit: contain; mix-blend-mode: multiply; }
:root[data-theme="dark"] .logo { filter: invert(1); mix-blend-mode: screen; }
.id-text { display: flex; flex-direction: column; line-height: 1.25; }
.id-name { font: 300 20px var(--font); }
.id-tag { font-size: 15px; color: var(--text-2); }

nav h2 {
  margin: 16px 0 4px; padding: 0 8px;
  font: 500 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
nav ul { list-style: none; margin: 0; padding: 0; }
nav .item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 6px 8px; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: inherit; font-size: 16.5px; line-height: 1.4;
  text-align: left; text-decoration: none; cursor: pointer;
}
nav .item:hover { background: var(--hover); }
nav .item[aria-current="page"] { background: var(--sel); font-weight: 500; box-shadow: inset 3px 0 0 var(--accent); }
nav .item.ext { color: var(--text-2); }
nav .item.tbd { color: var(--text-3); cursor: default; }
nav .item.tbd:hover { background: none; }
nav .mark { color: var(--text-3); font-size: 13px; }
nav .chev { color: var(--text-3); font-size: 11px; transition: transform .15s; }
nav .group[data-open="true"] .chev { transform: rotate(90deg); }
nav .sub { display: none; padding-left: 14px; }
nav .group[data-open="true"] + .sub { display: block; }

.side-foot { margin-top: auto; padding: 14px 6px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.theme {
  margin-left: auto; font: inherit; font-size: 12px; color: var(--text-2);
  background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 12px; cursor: pointer;
}
.theme:hover { background: var(--hover); }
.ver { font-size: 11px; color: var(--text-3); }

.pane { padding: 48px clamp(20px, 5vw, 64px) 64px; outline: none; }
.pane > * { max-width: 760px; }
.back { display: none; margin-bottom: 18px; font-size: 14px; text-decoration: none; }
.pane h1 { margin: 0 0 4px; font: 300 42px/1.2 var(--font); }
.pane h2 { font-weight: 300; }
.pane .tagline { margin: 0 0 24px; font-weight: 300; font-size: 20px; color: var(--text-2); }
.pane p { margin: 0 0 1em; }
.hero {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); margin: 0 0 24px;
  object-fit: cover; background: var(--card); border: 1px dashed var(--line-2);
  display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 14px;
}
img.hero { display: block; border-style: solid; border-color: var(--line); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.btn {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 16.5px; background: var(--card);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.tbd { color: var(--text-3); border-style: dashed; pointer-events: none; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.gallery button { padding: 0; border: 0; background: none; border-radius: 8px; cursor: zoom-in; }
.gallery img { display: block;  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.zoom { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; text-align: right; cursor: zoom-out; }
.zoom::backdrop { background: rgba(0, 0, 0, .85); }
.zoom img { display: block; max-width: 96vw; max-height: calc(96vh - 44px); border-radius: 8px; }
.zoom-close { margin-bottom: 8px; font: inherit; font-size: 13px; color: #fff; background: none; border: 1px solid #fff; border-radius: 999px; padding: 3px 12px; cursor: pointer; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.card {
  display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.card b { display: block; font-weight: 500; }
.card span { font-size: 15px; color: var(--text-2); }
.home-photo {
  width: 140px; height: 140px; border-radius: 50%; margin-bottom: 20px;
  background: var(--accent-bg) center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; font: 500 40px var(--font); color: var(--accent);
}

@media (max-width: 720px) {
  .app { display: block; }
  .sidebar { position: static; height: auto; min-height: 100vh; border-right: 0; padding: 24px 16px 16px; }
  .pane { display: none; padding: 20px 16px 48px; min-height: 100vh; }
  body.show-detail .sidebar { display: none; }
  body.show-detail .pane { display: block; }
  .back { display: inline-block; }
  .pane h1 { font-size: 34px; }
  nav .item { padding: 11px 10px; border: 1px solid var(--line); margin-bottom: 6px; background: var(--card); }
  nav .sub { padding-left: 12px; }
  .home-photo { display: none; }
}
