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

:root {
  color-scheme: light;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --stone: #d7cbbd;
  --sand: #f4efe9;
  --accent: #b87333;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Georgia", "Times New Roman", serif;
  color: var(--ink);
  background: #fff;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3vw;
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.2rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.view-controls {
  display: flex;
  gap: 0.4rem;
}

.view-btn {
  border: 1px solid rgba(31, 31, 31, 0.3);
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  cursor: pointer;
}

.lang-toggle {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0.4rem 0.9rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--sand);
}

.jump-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.jump-btn {
  border: 1px solid rgba(31, 31, 31, 0.25);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
  cursor: pointer;
}

main {
  padding: 0 6vw 4rem;
}

.overview {
  position: relative;
  border: 1px solid rgba(31, 31, 31, 0.1);
  height: calc(100vh - 96px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  direction: ltr;
  background: radial-gradient(rgb(0 0 0 / 22%) var(--grid-dot, 2.3px), transparent var(--grid-dot, 2.3px));
  background-size: var(--grid-size, 22px) var(--grid-size, 22px);
  background-position: 0 0;
}

.overview.is-panning {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.overview-hint {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

.overview-canvas {
  position: absolute;
  inset: 0;
  width: 6000px;
  height: 4000px;
  padding: 2rem;
  transform-origin: 0 0;
  transition: transform 220ms ease;
}

.overview.is-panning .overview-canvas {
  transition: none;
}

.node {
  background: var(--card);
  padding: 0;
  box-shadow: 0 0 20px 7px rgb(255 255 255 / 80%);
  display: grid;
  gap: 0.7rem;
  position: absolute;
  width: 320px;
}

.dir-arrow {
  --arrow-gap: 0px;
  --arrow-gap-multiplier: 1;
  --arrow-angle: 0deg;
  --arrow-length: 100px;
  position: absolute;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transform: translate(0, -50%) rotate(var(--arrow-angle));
  transform-origin: left center;
  display: block;
  height: 1px;
  width: var(--arrow-length);
}

.dir-arrow-hit {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--arrow-length) + 40px);
  height: calc(var(--arrow-length) + 40px);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.dir-arrow-text {
  position: absolute;
  top: -30px;
  left: 20px;
}

.dir-arrow.is-flipped .dir-arrow-text {
  top: auto;
  bottom: -30px;
  transform: scale3d(-1, -1, -1);
  left: auto;
  right: 20px;
}

.dir-arrow-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.dir-arrow-line::before,
.dir-arrow-line::after {
  height: 10px;
  width: 2px;
  background: currentColor;
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  transform: rotate(135deg);
}

.dir-arrow-line::before {
  top: -2px;
  bottom: auto;
  transform: rotate(45deg);
}

.dir-arrow.arrow-left,
.dir-arrow.arrow-up,
.dir-arrow.arrow-down {
}

.node.is-expanded {
  z-index: 2;
}

.node h1,
.node h2,
.node h3 {
  margin: 0;
}

.node p {
  margin: 0;
  color: var(--muted);
}

.section-header {
  display: grid;
  gap: 0.4rem;
}

.projects-filters {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 0.8rem;
}

.filter-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  color: var(--muted);
}

.filter-field select {
  appearance: none;
  border: 1px solid rgba(31, 31, 31, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.04rem;
  text-transform: none;
}

.projects-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.project-card {
  border: 1px solid rgba(31, 31, 31, 0.08);
  padding: 1rem;
  background: #faf7f2;
  display: grid;
  gap: 0.4rem;
}

.project-logo {
  align-self: start;
  font-size: 0.7rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  color: var(--muted);
}

.project-stats {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.project-stat {
  margin: 0;
  display: grid;
  gap: 0.2rem;
}

.project-stat dt,
.project-stat dd {
  margin: 0;
}

.project-stat dt {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.project-stat dd {
  font-size: 0.85rem;
  color: var(--ink);
}

.project-figure {
  height: 110px;
  background: linear-gradient(135deg, rgba(184, 115, 51, 0.2), rgba(31, 31, 31, 0.06));
  border-radius: 6px;
}

.cycling-image,
.about-image,
.philosophy-image,
.project-image,
.portrait {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.4rem;
}

.project-image {
  height: 60px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(184, 115, 51, 0.18), rgba(31, 31, 31, 0.08));
}

.about-image,
.philosophy-image {
  height: 140px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(184, 115, 51, 0.18), rgba(31, 31, 31, 0.08));
}

.section-note {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.node-hub {
  width: 360px;
  text-align: center;
  background: rgb(255 255 255 / 48%);
}

.node-hub .arrow-projects {
  left: -110px;
  top: 50%;
}

.node-hub .arrow-contact {
  left: -40px;
  top: -70px;
}

.node-hub .arrow-about {
  right: -40px;
  top: -70px;
}

.node-hub .arrow-team {
  right: -100px;
  top: 50%;
}

.node-hub .arrow-philosophy {
  right: -30px;
  bottom: -70px;
}

.hub-label {
  font-size: 1.1rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.hub-media {
  display: grid;
  justify-items: center;
}

.cycling-image {
  width: 220px;
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(184, 115, 51, 0.3), rgba(31, 31, 31, 0.1));
  transition: background 400ms ease;
}


.contact-form {
  display: grid;
  gap: 0.6rem;
}

.form-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.form-field input,
.form-field textarea {
  border: 1px solid rgba(31, 31, 31, 0.2);
  padding: 0.4rem 0.5rem;
  font-family: inherit;
}

.contact-submit {
  border: 1px solid rgba(31, 31, 31, 0.3);
  background: var(--ink);
  color: var(--sand);
  padding: 0.45rem 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  cursor: pointer;
}

.team-grid {
  display: grid;
  gap: 0.8rem;
}

.team-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.6rem;
  align-items: center;
}

.portrait {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.15), rgba(184, 115, 51, 0.2));
}

.manifesto {
  margin: 0;
  padding: 0 0 0 1rem;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}

.minimap {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
}

.minimap-tab {
  border: 1px solid rgba(31, 31, 31, 0.25);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  cursor: pointer;
}

.minimap-panel {
  position: absolute;
  right: 0;
  bottom: 2.2rem;
  width: 200px;
  height: 140px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 31, 31, 0.2);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  padding: 0.4rem;
}

.minimap:hover .minimap-panel,
.minimap:focus-within .minimap-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.minimap-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: radial-gradient(rgba(31, 31, 31, 0.15) 1px, transparent 1px);
  background-size: 10px 10px;
  overflow: hidden;
}

.minimap-node {
  position: absolute;
  border: 1px solid rgba(31, 31, 31, 0.3);
  background: rgba(184, 115, 51, 0.15);
  border-radius: 3px;
}

.minimap-viewport {
  position: absolute;
  border: 1px solid rgba(31, 31, 31, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  pointer-events: none;
}

[data-section="hub"] {
  left: 3200px;
  top: 2060px;
}

[data-section="projects"] {
  left: 1180px;
  top: 1740px;
  width: 680px;
}

.node-projects .arrow-contact {
  right: -80px;
  top: 20px;
}

.node-projects .arrow-about {
  right: -80px;
  top: 80px;
}

.node-projects .arrow-team {
  right: -80px;
  top: 140px;
}

.node-projects .arrow-philosophy {
  right: -80px;
  bottom: 40px;
}

[data-section="contact"] {
  left: 2740px;
  top: 480px;
  width: 380px;
}

.node-contact .arrow-projects {
  left: -110px;
  top: 60px;
}

.node-contact .arrow-about {
  right: -90px;
  top: 60px;
}

.node-contact .arrow-team {
  right: -90px;
  bottom: 60px;
}

.node-contact .arrow-philosophy {
  right: -90px;
  bottom: 20px;
}

[data-section="about"] {
  left: 4260px;
  top: 720px;
  width: 380px;
}

.node-about .arrow-projects {
  left: -110px;
  top: 40px;
}

.node-about .arrow-contact {
  left: -110px;
  top: 0;
}

.node-about .arrow-team {
  right: -90px;
  bottom: 40px;
}

.node-about .arrow-philosophy {
  right: -90px;
  bottom: 0;
}

[data-section="team"] {
  left: 4620px;
  top: 1960px;
  width: 460px;
}

.node-team .arrow-projects {
  left: -110px;
  top: 50%;
}

.node-team .arrow-contact {
  left: -90px;
  top: -10px;
}

.node-team .arrow-about {
  left: -20px;
  top: -60px;
}

.node-team .arrow-philosophy {
  left: -20px;
  bottom: -70px;
}

[data-section="philosophy"] {
  left: 4080px;
  top: 3000px;
  width: 480px;
}

.node-philosophy .arrow-projects {
  left: -110px;
  top: 20px;
}

.node-philosophy .arrow-contact {
  left: -90px;
  top: -20px;
}

.node-philosophy .arrow-about {
  left: 20px;
  top: -70px;
}

.node-philosophy .arrow-team {
  right: -90px;
  top: -20px;
}

[dir="rtl"] body {
  font-family: "Tahoma", "Arial", sans-serif;
}

[dir="rtl"] .topbar {
  flex-direction: row-reverse;
}

[dir="rtl"] .topbar-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .overview-hint {
  left: auto;
  right: 1rem;
}

[dir="rtl"] .node {
  direction: rtl;
  text-align: right;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .overview {
    height: calc(100vh - 140px);
  }

  .overview-canvas {
    width: 4600px;
    height: 3400px;
  }

  [data-section="projects"] {
    width: 600px;
  }
}

@media (max-width: 720px) {
  main {
    padding: 0 5vw 3rem;
  }

  .overview {
    height: calc(100vh - 170px);
  }

  .overview-canvas {
    width: 4000px;
    height: 3000px;
  }

  .minimap {
    display: none;
  }
}
