@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap");

:root {
  --green: #0b8468;
  --green-dark: #075c4a;
  --green-soft: #dff1e8;
  --hitchwiki: #b73327;
  --hitchwiki-dark: #85261f;
  --hitchwiki-yellow: #f7df79;
  --hitchwiki-ochre: #b96800;
  --hitchwiki-brown: #6e3100;
  --cream: #fbf7e9;
  --paper: #fffdf7;
  --ink: #5b2b08;
  --muted: #76563c;
  --yellow: #f6bb4c;
  --border: #e5d8ba;
  --shadow: 0 16px 40px rgba(110, 49, 0, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: none;
  overflow-x: hidden;
}

body {
  width: 100% !important;
  min-width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ink) !important;
  background: var(--cream) !important;
  font-family: Nunito, Avenir Next, system-ui, -apple-system, sans-serif !important;
  line-height: 1.55;
}

.site-header {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100vw !important;
  max-width: none !important;
  min-height: 5.5rem !important;
  margin: 0 !important;
  padding: 0.8rem clamp(1rem, 3vw, 3rem) !important;
  color: var(--hitchwiki-brown);
  background: var(--hitchwiki-yellow) !important;
  border-bottom: 1px solid rgba(185, 104, 0, 0.24);
  box-shadow: 0 4px 18px rgba(110, 49, 0, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--hitchwiki-brown) !important;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
  text-decoration: none;
}

.brand-logo {
  width: 3.4rem !important;
  height: 3.4rem !important;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.9rem !important;
  object-fit: cover !important;
  box-shadow: 0 5px 14px rgba(5, 55, 45, 0.24);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem !important;
  margin-left: auto !important;
}

.header-nav a {
  padding: 0.55rem 0.75rem;
  color: var(--hitchwiki-brown) !important;
  border-radius: 0.65rem;
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
}

.header-nav a:hover {
  background: rgba(185, 104, 0, 0.13);
}

.identity-pill {
  min-height: 2.7rem;
  padding: 0.55rem 0.85rem !important;
  color: var(--hitchwiki-brown) !important;
  background: rgba(255, 255, 255, 0.32) !important;
  border: 1px solid rgba(110, 49, 0, 0.25) !important;
  border-radius: 0.7rem !important;
  font-family: inherit !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.identity-pill[data-state="connected"] {
  color: var(--hitchwiki-brown) !important;
  background: rgba(255, 253, 247, 0.58) !important;
  border-color: rgba(110, 49, 0, 0.32) !important;
}

.nostr-modal {
  width: min(36rem, calc(100vw - 2rem));
  max-width: 36rem;
  margin: auto;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--hitchwiki-brown);
  background: var(--paper);
  border: 1px solid rgba(185, 104, 0, 0.28);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgba(91, 43, 8, 0.3);
}

.nostr-modal::backdrop {
  background: rgba(56, 28, 7, 0.5);
  backdrop-filter: blur(4px);
}

.nostr-modal form {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.nostr-close {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  color: var(--hitchwiki-brown);
  background: rgba(247, 223, 121, 0.45);
  border: 0;
  border-radius: 50%;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.nostr-kicker {
  margin: 0 0 0.45rem;
  color: var(--hitchwiki-ochre);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nostr-modal h2 {
  max-width: 13ch;
  margin: 0 0 1rem;
  color: var(--hitchwiki-brown) !important;
  font-size: clamp(1.8rem, 5vw, 2.6rem) !important;
}

.nostr-modal > p:not(.nostr-kicker) {
  margin: 0.8rem 0;
  color: var(--muted);
}

.nostr-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.nostr-actions a,
.nostr-actions button {
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.nostr-actions a {
  color: var(--paper);
  background: var(--hitchwiki-ochre);
}

.nostr-actions button {
  color: var(--hitchwiki-brown);
  background: rgba(247, 223, 121, 0.45);
  border: 1px solid rgba(110, 49, 0, 0.2);
  cursor: pointer;
}

body > .layout {
  position: relative !important;
  left: 50% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 50vw) minmax(0, 50vw) !important;
  align-items: stretch;
  min-height: calc(100vh - 5.5rem) !important;
  width: 100vw !important;
  min-width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 -50vw !important;
}

body > .layout > .map,
body > .layout > main {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

.map {
  position: sticky !important;
  top: 0;
  width: 100% !important;
  height: calc(100vh - 5.5rem) !important;
  margin: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: inset -1px 0 var(--border) !important;
}

.map::after {
  right: auto;
  bottom: 1.1rem !important;
  left: 1.1rem !important;
  max-width: calc(100% - 2.2rem);
  padding: 0.45rem 0.75rem !important;
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(24, 52, 46, 0.85) !important;
  backdrop-filter: blur(5px);
}

.map .folium-map {
  width: 100% !important;
  height: 100% !important;
}

main {
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 5.5rem);
  width: auto !important;
  margin: 0 !important;
  padding: clamp(1rem, 2vw, 2rem) clamp(1.25rem, 3vw, 3rem)
    clamp(2.2rem, 5vw, 5rem) !important;
  background:
    linear-gradient(rgba(255, 253, 247, 0.82), rgba(255, 253, 247, 0.88)),
    url("hitchhiker-luxemburg-1977.jpg") center / cover fixed !important;
}

.about-line {
  max-width: none;
  margin: 0 0 1.8rem;
  padding: 1.1rem 1.25rem;
  color: var(--hitchwiki-brown);
  background: rgba(247, 223, 121, 0.86);
  border: 1px solid rgba(185, 104, 0, 0.2);
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(83, 65, 20, 0.08);
  font-family: Nunito, Avenir Next, system-ui, sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: -0.025em;
}

.intro {
  max-width: 43rem !important;
  margin: 0 0 2.3rem !important;
  text-align: left !important;
}

.eyebrow {
  margin: 0 0 0.65rem !important;
  color: var(--hitchwiki-ochre) !important;
  font-size: 0.75rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
}

h1,
h2 {
  color: var(--hitchwiki-brown) !important;
  font-family: inherit !important;
  line-height: 1.05 !important;
  letter-spacing: -0.045em !important;
  text-transform: none !important;
}

h1 {
  max-width: 11ch;
  margin: 0 0 1rem !important;
  font-size: clamp(2.6rem, 5vw, 5rem) !important;
  font-weight: 900 !important;
}

.intro > p:last-child {
  max-width: 38rem;
  color: var(--muted) !important;
  font-size: clamp(1rem, 1.5vw, 1.15rem) !important;
}

.projects {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.8rem !important;
  margin: 0;
  padding: 0 !important;
  list-style: none;
}

.projects li {
  position: relative;
  display: grid !important;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 1rem;
  align-content: start;
  min-height: 8.4rem !important;
  padding: 1.15rem !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86) !important;
  border: 1px solid var(--border) !important;
  border-radius: 1rem !important;
  box-shadow: 0 5px 14px rgba(24, 52, 46, 0.05) !important;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.projects li:hover {
  z-index: 1;
  border-color: #d3ad6e !important;
  box-shadow: var(--shadow) !important;
  transform: translateY(-3px);
}

.projects li::after {
  position: absolute;
  top: 0.95rem;
  right: 1rem;
  color: rgba(185, 104, 0, 0.55);
  font-size: 1.1rem;
  content: "↗";
}

.projects li > a::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
}

.projects a {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  padding-right: 1.2rem;
  color: var(--hitchwiki-ochre) !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  text-decoration: none;
}

.experimental-label {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.4rem;
  color: var(--hitchwiki-brown);
  background: rgba(247, 223, 121, 0.78);
  border: 1px solid rgba(185, 104, 0, 0.28);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.projects span {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0.25rem !important;
  color: var(--muted) !important;
  font-size: 0.89rem !important;
}

.project-logo,
.projects span.project-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  width: 5.6rem !important;
  height: 5.6rem !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0.65rem;
  box-shadow: none;
}

.project-logo {
  object-fit: contain;
  object-position: center;
}

.projects span.project-icon {
  color: initial !important;
  font-size: 2.55rem !important;
  line-height: 1 !important;
}

.projects li:hover .project-logo,
.projects li:hover .project-icon {
  transform: scale(1.04);
}

.experiments {
  margin-top: 3rem;
  padding-top: 2.4rem;
  border-top: 1px solid rgba(185, 104, 0, 0.22);
}

.experiments-heading {
  max-width: 39rem;
  margin-bottom: 1.35rem;
}

.experiments-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.experiments-heading p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.ideas-card {
  margin-top: 1.5rem;
}

.ideas {
  margin: 2rem 0 0 !important;
  padding: 1.3rem 1.4rem !important;
  background: #fff5d9 !important;
  border: 0 !important;
  border-left: 0.38rem solid var(--yellow) !important;
  border-radius: 0.8rem !important;
}

.ideas p {
  margin-top: 0;
  font-weight: 800;
}

.ideas a,
.note a,
footer a {
  color: var(--hitchwiki-ochre) !important;
  font-weight: 800;
}

.note {
  margin: 1.5rem 0 0 !important;
  color: var(--muted) !important;
  text-align: left !important;
}

footer {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: auto 0 0 !important;
  padding: 1.5rem 0 0 !important;
  color: var(--muted) !important;
  border-top: 1px solid rgba(185, 104, 0, 0.18);
  font-size: 0.84rem !important;
}

.home-footer {
  display: block;
  justify-content: center;
  padding: 1.25rem 0 0 !important;
  text-align: center;
}

.home-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 2rem;
}

.home-footer a {
  text-decoration: none;
}

.home-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-footer .footer-build {
  display: block;
  margin-top: 0.7rem;
  color: #7d8c86;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.footer-build .commit-link {
  margin-left: 0.7rem;
  vertical-align: middle;
}

.footer-meta,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.footer-meta {
  margin-left: auto;
}

.github-link {
  display: inline-flex;
  color: var(--hitchwiki-brown) !important;
}

.github-link svg,
.commit-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

.commit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--hitchwiki-brown) !important;
  font-weight: 800;
  text-decoration: none;
}

.commit-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.license-badge {
  display: inline-flex;
  align-items: center;
}

.license-badge img {
  width: 71px;
  height: 25px;
}

@media (max-width: 980px) {
  body > .layout {
    grid-template-columns: 1fr !important;
    width: 100vw !important;
  }

  .map {
    position: relative !important;
    height: min(64vh, 34rem) !important;
  }
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    padding: 0.7rem 1rem !important;
  }

  .site-header .brand {
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
  }

  .brand-logo {
    width: 2.8rem !important;
    height: 2.8rem !important;
  }

  .header-nav {
    display: none !important;
  }

  .identity-pill {
    margin-left: auto;
    min-width: 0;
    max-width: calc(100vw - 13.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nostr-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nostr-actions a,
  .nostr-actions button {
    text-align: center;
  }

  main {
    padding: 1.25rem 1rem 2.5rem !important;
    background-attachment: scroll !important;
  }

  .projects {
    grid-template-columns: 1fr !important;
  }

  .projects li {
    min-height: 9.2rem !important;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    width: 100% !important;
  }

  .home-footer {
    align-items: center;
  }
}
