/* UX Inspiration: base theme, top bar, search */

:root {
  /* Palette after gosu.team/tanya */
  --bg: #f7f4ee;
  --card: #fdfbf7;
  --text: #1f1b16;
  --text-soft: #5e554a;
  --text-faint: #8f877b;
  --accent: #2443d6;
  --accent-ink: #1a33b0;
  --accent-soft: #e6e9f8;
  --lime: #d9f45c;
  --sand: #efe9df;
  --link: #2443d6;
  --border: #e1e0d9;
  --mark: #d9f45c;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 14px;
  --maxw: 780px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ─────────────────────────────── */
.topbar {
  flex-shrink: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgb(247 244 238 / 90%);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark { width: 30px; height: 30px; flex-shrink: 0; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.logo-mark .logo-pin { transform-origin: 10px 12px; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo:hover .logo-mark { transform: rotate(-6deg); }
.logo:hover .logo-pin { transform: scale(1.25); }

.logo-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36;
}
.logo-text em { font-style: italic; font-weight: 400; color: var(--accent); }

.controls { display: flex; align-items: center; gap: 10px; }

.topnav { display: flex; gap: 4px; }
.topnav a { padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-soft); text-decoration: none; }
.topnav a:hover { color: var(--text); background: var(--sand); }
.topnav a[aria-current="page"] { color: var(--text); background: var(--sand); }

.searchbox { position: relative; display: flex; align-items: center; }

.searchbox svg {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  fill: var(--text-faint);
  pointer-events: none;
}

.searchbox input {
  width: 240px;
  max-width: 46vw;
  padding: 8px 30px 8px 33px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  background: #fff;
  transition: width 0.15s, box-shadow 0.15s;
}

.searchbox input { font-family: inherit; background: var(--card); }
.searchbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(36 67 214 / 14%); }

.clear-btn {
  position: absolute;
  right: 8px;
  border: 0;
  background: none;
  font-size: 18px;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px 6px;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .searchbox input { width: 150px; }
}
