:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --overlay0: #6c7086;
  --overlay1: #7f849c;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
  --text: #cdd6f4;
  --blue: #89b4fa;
  --lavender: #b4befe;
  --pink: #f5c2e7;
  --mauve: #cba6f7;
  --red: #f38ba8;
  --peach: #fab387;
  --yellow: #f9e2af;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --sky: #89dceb;

  --panel: #a9b4c2;
  --gh-card: #2a2c3b;
  --shadow: rgba(0, 0, 0, 0.8);
  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1120px;
  color-scheme: dark;
}

/* light theme (Catppuccin Latte, accents darkened a little for contrast) */
:root[data-theme="light"] {
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --crust: #ffffff;
  --surface0: #dce0e8;
  --surface1: #ccd0da;
  --surface2: #acb0be;
  --overlay0: #9ca0b0;
  --overlay1: #7c7f93;
  --subtext0: #5c5f77;
  --subtext1: #4c4f69;
  --text: #303446;
  --blue: #1e66f5;
  --lavender: #5468e8;
  --pink: #c8459f;
  --mauve: #8839ef;
  --red: #d20f39;
  --peach: #d4560b;
  --yellow: #b07219;
  --green: #2f8a1f;
  --teal: #137a80;
  --sky: #0485bd;

  --panel: #ccd3de;
  --gh-card: #ffffff;
  --shadow: rgba(76, 79, 105, 0.35);
  color-scheme: light;
}

.theme-anim, .theme-anim * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.link {
  color: var(--blue);
  text-decoration: underline dashed;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.link:hover { color: var(--lavender); text-decoration-style: solid; }

::selection { background: var(--surface1); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: color-mix(in srgb, var(--base) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.prompt {
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.prompt a:hover { color: var(--pink); }
.prompt .sep { color: var(--subtext0); margin: 0 1px; }
.cursor {
  display: inline-block;
  width: 9px;
  height: 17px;
  margin-left: 4px;
  vertical-align: -3px;
  background: var(--pink);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; gap: 36px; font-size: 14px; font-weight: 600; }
.nav a { color: var(--text); position: relative; }
.nav a:hover, .nav a.active { color: var(--pink); }

.header-right { display: flex; align-items: center; gap: 28px; }

.theme-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--surface0);
  background: none;
  color: var(--text);
  cursor: pointer;
}
.theme-btn:hover { color: var(--pink); border-color: var(--surface1); }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

/* ⚙ settings panel */
.settings { position: relative; }
.settings-btn svg { transition: transform 0.4s ease; }
.settings-btn[aria-expanded="true"] { color: var(--pink); border-color: var(--surface1); }
.settings-btn[aria-expanded="true"] svg { transform: rotate(90deg); }

.settings-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 16px;
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 12px;
  box-shadow: 0 20px 40px -16px var(--shadow);
  font-size: 13px;
  font-weight: 400;
  animation: fade 0.18s ease both;
}
.set-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }
.set-close { background: none; border: 0; color: var(--overlay1); font: inherit; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.set-close:hover { color: var(--text); background: var(--surface0); }
.set-label { margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--overlay1); }
.set-note { text-transform: none; letter-spacing: 0; font-weight: 400; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--base); border: 1px solid var(--surface0); border-radius: 8px; padding: 3px; }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 0; border-radius: 6px; padding: 7px 4px;
  color: var(--subtext0); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--surface0); color: var(--pink); }

.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.preset {
  display: flex; align-items: center; gap: 8px;
  background: var(--base); border: 1px solid var(--surface0); border-radius: 7px;
  padding: 7px 8px; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; text-align: left;
}
.preset:hover { border-color: var(--surface2); }
.preset[aria-pressed="true"] { border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.swatches { display: flex; flex: none; }
.swatches i { width: 11px; height: 11px; border-radius: 50%; margin-right: -3px; border: 1.5px solid var(--base); }

.color-list { display: grid; gap: 4px; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; color: var(--subtext1); cursor: pointer; }
.color-row input[type="color"] {
  width: 44px; height: 26px; padding: 0; border: 1px solid var(--surface1); border-radius: 6px;
  background: none; cursor: pointer;
}
.color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.color-row input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }

.set-reset {
  width: 100%; margin-top: 16px; padding: 8px; border-radius: 7px;
  background: none; border: 1px dashed var(--surface2); color: var(--subtext0);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.set-reset:hover { color: var(--red); border-color: var(--red); }

.menu-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  padding: 4px;
  cursor: pointer;
}

/* ---------- layout ---------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 96px;
}

.narrow { max-width: 680px; margin: 0 auto; }

/* ---------- hero ---------- */

.hero { padding: 100px 0 40px; max-width: 690px; }

.hero h1 {
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.2;
  margin: 0 0 22px;
  letter-spacing: -0.5px;
}
.hero h1 .name { color: var(--blue); }
.hero h1 .greet { white-space: pre; }
.hero h1 .greet::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 3px;
  vertical-align: -0.08em;
  background: var(--pink);
  animation: blink 1.1s steps(1) infinite;
}

.bio { color: var(--subtext1); font-size: 16px; line-height: 1.85; letter-spacing: 0.2px; }
.bio p { margin: 0; }
.bio a { color: var(--blue); text-decoration: underline dashed; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin-top: 36px;
  font-size: 13px;
  font-weight: 600;
}
.socials a { display: inline-flex; align-items: center; gap: 7px; color: var(--subtext1); }
.socials a:hover { color: var(--pink); }
.socials .divider { width: 1px; height: 11px; background: var(--surface2); margin: 0 18px; }
.socials .more { color: var(--blue); }

.work {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 64px;
  font-size: 14px;
  font-weight: 600;
}
.work a, .work span.item { display: inline-flex; align-items: center; gap: 9px; }
.work .past { opacity: 0.55; }
.work .past small { color: var(--overlay0); font-weight: 400; font-size: 11px; margin-left: 4px; }
.work .slash { color: var(--subtext0); }
.work .logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: contain;
}
.work .logo.letter {
  display: grid;
  place-items: center;
  background: var(--mauve);
  color: var(--crust);
  font-size: 14px;
}

/* ---------- sections ---------- */

.section { margin-top: 96px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.3px;
}
.section-head h2 svg { color: var(--blue); flex: none; }
.section-head .link { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* about page layout + photo stack */
.about-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 60px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.about-layout.no-photos { grid-template-columns: minmax(0, 680px); justify-content: center; }

.photo-col { position: sticky; top: 90px; }

.photo-stack {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.photo-stack:disabled { cursor: default; }
.photo-stack:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: 14px; }

/* the "more photos behind" cards */
.photo-stack.multi::before,
.photo-stack.multi::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid var(--surface1);
  transition: transform 0.25s ease;
}
.photo-stack.multi::before { background: var(--surface0); transform: rotate(-4deg); }
.photo-stack.multi::after { background: var(--mantle); transform: rotate(2.5deg); }
.photo-stack.multi:hover::before { transform: rotate(-6deg) translateX(-4px); }
.photo-stack.multi:hover::after { transform: rotate(4deg) translateX(4px); }

.photo-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  box-shadow: 0 18px 36px -18px var(--shadow);
  transition: transform 0.25s ease;
}
.photo-stack.multi:hover .photo-frame { transform: rotate(-1deg) scale(1.015); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame.pop { animation: photo-pop 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.2); }
@keyframes photo-pop {
  from { opacity: 0; transform: translateX(18px) rotate(3deg) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.photo-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--mantle);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}
.photo-end .big { font-size: 56px; line-height: 1; color: var(--pink); transition: transform 0.4s ease; }
.photo-stack:hover .photo-end .big { transform: rotate(-180deg); }


/* about page headings */
.about-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--pink);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 24px;
  scroll-margin-top: 80px;
}

.page-title { font-size: clamp(26px, 5vw, 34px); margin: 80px 0 8px; }
.page-sub { color: var(--subtext0); margin: 0 0 40px; }

/* ---------- project cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--surface0);
  border-radius: 10px;
  overflow: hidden;
  background: var(--base);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--surface1);
  box-shadow: 0 14px 30px -18px var(--shadow);
}

.cover {
  background: var(--panel);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 7% 7.5%;
  overflow: hidden;
}
.cover.has-image { padding: 0; background: var(--surface0); }
.cover.has-image img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-body h3 { margin: 0; font-size: 19px; }
.card-body p {
  margin: 0;
  color: var(--blue);
  font-size: 13.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body .tags { margin-top: auto; padding-top: 6px; }

/* GitHub-style repo card shown inside the cover */
.gh {
  width: 100%;
  background: var(--gh-card);
  border-radius: 8px;
  padding: 14px 14px 12px;
  color: var(--text);
  font-family: "Fira Sans Condensed", "Arial Narrow", var(--font);
  box-shadow: 0 10px 22px -10px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.gh-top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-style: italic; }
.dots { display: flex; gap: 5px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.stars { display: inline-flex; align-items: center; gap: 5px; }
.gh-name { font-size: 17px; color: var(--pink); }
.gh-name b { color: var(--green); font-weight: 400; }
.gh-desc {
  font-size: 15px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.gh-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 4px; }
.avatars { display: flex; }
.avatars img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gh-card);
  margin-right: -8px;
  background: var(--surface0);
}
.gh-count { font-size: 12.5px; color: var(--subtext0); white-space: nowrap; }
.gh.loading .gh-desc { color: var(--overlay0); }

/* placeholder card when there's no repo or image */
.term-name { font-size: 20px; color: var(--pink); }
.term-name b { color: var(--green); font-weight: 400; }

/* ---------- project filters ---------- */

.filters { display: grid; gap: 14px; margin-bottom: 30px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 10px;
  color: var(--overlay1);
}
.search:focus-within { border-color: var(--blue); color: var(--blue); }
.search input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.filters select {
  padding: 0 12px;
  min-height: 44px;
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.filters select:focus { outline: none; border-color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--surface0);
  background: var(--surface0);
  color: var(--chip);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chip:hover { border-color: var(--chip); }
.chip[aria-pressed="true"] {
  border-color: var(--chip);
  background: color-mix(in srgb, var(--chip) 18%, var(--base));
}
.chip-n { font-weight: 400; font-size: 11px; color: var(--overlay1); }

.filter-status { display: flex; align-items: center; gap: 14px; min-height: 20px; font-size: 13px; color: var(--overlay1); }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
}
.link-btn:hover { color: var(--pink); }

/* ---------- tags ---------- */

.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tags > svg { color: var(--subtext1); margin-right: 4px; flex: none; }
.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--surface0);
  line-height: 1.6;
}

/* ---------- pics: Pinterest-style masonry ---------- */

.masonry { display: flex; align-items: flex-start; gap: 16px; }
.masonry-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.pin {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface0);
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.pin img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
}
.pin::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pin-cap {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pin:hover img, .pin:focus-visible img { transform: scale(1.04); }
.pin:hover::after, .pin:focus-visible::after,
.pin:hover .pin-cap, .pin:focus-visible .pin-cap { opacity: 1; transform: none; }
.pin:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* home page: one flat row of random pics (sizes are set by home.js to fill the width) */
.strip { display: flex; gap: 14px; overflow: hidden; }
.strip-pic { flex: none; }
.strip-pic img { width: 100%; height: 100%; }

/* full-screen viewer */
.no-scroll { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: max(56px, env(safe-area-inset-top)) 16px max(48px, env(safe-area-inset-bottom));
  background: rgba(10, 10, 16, 0.92);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease both;
}
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 0; height: 100%; justify-content: center; }
.lb-img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lb-img.pop { animation: photo-pop 0.3s ease; }
.lb-cap { color: #e6e6f0; font-size: 14px; text-align: center; max-width: 60ch; }
.lb-count { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); color: #a6adc8; font-size: 13px; }
.lb-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; font-size: 16px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-figure { grid-column: 2; }

/* ---------- project detail ---------- */

.detail { padding-top: 60px; }
.detail .cover { border-radius: 10px; }
.detail h1 { color: var(--pink); font-size: clamp(28px, 5vw, 38px); margin: 30px 0 22px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  color: var(--blue);
  font-size: 14px;
  margin-bottom: 22px;
}
.meta span, .meta a { display: inline-flex; align-items: center; gap: 7px; }
.meta a { color: var(--subtext1); }
.meta a:hover { color: var(--pink); }

hr { border: 0; border-top: 1px solid var(--surface1); margin: 40px 0; }

/* ---------- markdown ---------- */

.prose { color: var(--text); font-size: 15.5px; line-height: 1.9; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--pink); line-height: 1.3; margin: 1.8em 0 0.7em; font-weight: 500; }
.prose h1 { font-size: 34px; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 20px; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--blue); text-decoration: underline dashed; text-underline-offset: 4px; }
.prose strong { color: var(--peach); }
.prose code {
  background: var(--surface0);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
  color: var(--green);
}
.prose pre {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: var(--text); }
.prose blockquote {
  margin: 1.4em 0;
  padding: 4px 18px;
  border-left: 3px solid var(--mauve);
  color: var(--subtext0);
}
.prose img { border-radius: 8px; margin: 1.5em auto; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li::marker { color: var(--mauve); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--surface1); padding: 6px 12px; }

/* ---------- misc ---------- */

.empty, .error-box {
  border: 1px dashed var(--surface1);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  color: var(--subtext0);
}

.site-footer {
  border-top: 1px solid var(--surface0);
  color: var(--overlay1);
  font-size: 13px;
  text-align: center;
  padding: 28px 24px 40px;
}

.fade-in { animation: fade 0.5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.skeleton { background: var(--surface0); border-radius: 10px; min-height: 340px; animation: pulse 1.4s ease infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
  .site-header { padding: 12px 18px; }
  .header-right { gap: 8px; }
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 12px;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: var(--mantle);
    border: 1px solid var(--surface0);
    border-radius: 8px;
    min-width: 160px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 8px 10px; }
  .hero { padding-top: 60px; }
  .masonry, .masonry-col { gap: 10px; }
  .pin { border-radius: 14px; }
  .pin-cap { opacity: 1; transform: none; font-size: 11.5px; left: 10px; bottom: 8px; }
  .pin:has(.pin-cap)::after { opacity: 1; }
  .lightbox { grid-template-columns: minmax(0, 1fr); padding-inline: 8px; }
  .lb-prev, .lb-next { position: absolute; bottom: 14px; width: 42px; height: 42px; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { left: calc(50% + 14px); }
  .lb-figure { grid-column: 1; }
  .lb-img { max-height: calc(100vh - 200px); }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; }
  .photo-col { position: static; width: 100%; max-width: 280px; margin: 0 auto; }
  main { padding: 0 16px 72px; }
}

@media (max-width: 480px) {
  .gh-desc { font-size: 13px; }
  .gh-name { font-size: 15px; }
  .avatars img { width: 30px; height: 30px; }
  .gh { gap: 6px; padding: 10px; }
  .cover { padding: 5%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
