@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400&display=swap');

@font-face {
  font-family: "";
  src: url('../fonts/jgs_Font.ttf');
}

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: rgba(17, 17, 17, 0.5);
  --accent: #000000;
  --accenty: #00ff00;
  --line: rgba(17, 17, 17, 0.3);
--font: 'Arial', monospace;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  color: var(--accent);
  font-family: monospace;
}
a:hover {
  color: var(--accenty);
}

/* ── Home: full-viewport lattice ── */

.lattice-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
}

#lattice-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.lattice-viewport #lattice-canvas {
  position: fixed;
  inset: 0;
  z-index: 150;
}

.lattice-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.lattice-overlay--back {
  z-index: 151;
}

.lattice-overlay--front {
  z-index: 300;
}

.lattice-overlay > * {
  pointer-events: auto;
}

.lattice-header {
  position: absolute;
  top: 0;
  left: 0;
  padding: 2rem;
  z-index: 200;
  pointer-events: none;
  display: flex;
  gap: 20%;
  align-items: flex-start;
}
.lattice-header-text {
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 3rem;
}
.lattice-header-text-left {
  width: 70%;
}
.lattice-header-text-left p {
  font-family: 'Helvetica';
  font-weight: bold;
  font-size: 15px !important;
  /* width: 60%; */
  margin: unset;
  color: var(--fg) !important;
  letter-spacing: unset !important;
  line-height: 1 !important;
  hyphens: none !important;
}
.lattice-header-text-right {
  width: 100%;
}
.lattice-header-text-right p {
  font-family: 'Helvetica';
  font-weight: bold;
  font-size: 15px !important;
  /* width: 60%; */
  margin: unset;
  color: var(--fg) !important;
  letter-spacing: unset !important;
  line-height: 1 !important;
  hyphens: none !important;
}
.lattice-logo {
  /* height: 120px; */
  max-width: 55vw;
  height: 15vh;
}

.lattice-header h1 {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-family: var(--font);

height: 30px;}

.lattice-header p {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-family: var(--font);
}

.lattice-connections {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 250;
  overflow: visible;
}

.lattice-connections line {
  stroke: var(--accenty);
  stroke-width: 2;
  opacity: 1;
  vector-effect: non-scaling-stroke;
}

.lattice-connections line.is-active {
  opacity: 1;
}

.lattice-node {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  /* box-shadow: 3px 3px 14px yellow,
  -3px -3px 14px yellow,
  -3px 3px 14px yellow,
  3px -3px 14px yellow,
  3px 3px 14px yellow,
  -3px -3px 14px yellow,
  -3px 3px 14px yellow,
  3px -3px 14px yellow,
  3px 3px 10px yellow,
  -3px -3px 10px yellow,
  -3px 3px 10px yellow,
  3px -3px 10px yellow */
  ;
}

.lattice-node.is-connection-source .lattice-anchor::before {
  background: var(--accent);
  border-color: var(--accent);
}

.lattice-node.is-connected .lattice-anchor {
  color: var(--accent);
}

.lattice-node.is-connected .lattice-anchor::before {
  background: var(--accent);
  border-color: var(--accent);
}

.lattice-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.35rem 1rem;
  /* font-size: 10px; */
  /* text-transform: uppercase; */
  color: var(--fg);
  cursor: pointer;
  background: var(--accenty);
  /* Explicit width so <button> and <span> anchors match
     (UA button borders are thinner than the CSS medium default). */
  border: 3px inset var(--accenty);
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font);
  /* font-weight: bold; */
  font-size: 13px !important;
  transition: color 0.2s ease;
}

.lattice-anchor[aria-expanded="true"] {
  color: var(--accent);
}

.lattice-anchor[aria-expanded="true"]::before {
  background: var(--accent);
  border-color: var(--accent);
}

.lattice-anchor::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: black;
  margin-right: 0.5rem;
  vertical-align: middle;
  filter: blur(2px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.lattice-anchor--text {
  cursor: pointer;
  pointer-events: auto;
}

/* Loading anchors are inert — not pressable yet. */
.lattice-anchor--loading,
.lattice-anchor--loading * {
  cursor: default;
  pointer-events: none !important;
}

.lattice-anchor__thumb {
  display: block;
  width: 14px;
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.lattice-anchor__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.75;
}

.lattice-anchor--image[aria-expanded="true"] .lattice-anchor__thumb img,
.lattice-anchor--image:hover .lattice-anchor__thumb img {
  filter: none;
  opacity: 1;
}

.lattice-anchor__label {
  white-space: nowrap;
}

/* ── iOS-style loading spinner inside anchor buttons ── */

.lattice-spinner {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

.lattice-spinner span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 4px;
  margin: -2px 0 0 -1px;
  border-radius: 1px;
  background: #f6f8f3;
  opacity: 0.3;
  animation: lattice-spinner-fade 0.9s linear infinite;
}

.lattice-spinner span:nth-child(1) { transform: rotate(0deg)   translateY(-4.5px); animation-delay: -0.9s; }
.lattice-spinner span:nth-child(2) { transform: rotate(45deg)  translateY(-4.5px); animation-delay: -0.7875s; }
.lattice-spinner span:nth-child(3) { transform: rotate(90deg)  translateY(-4.5px); animation-delay: -0.675s; }
.lattice-spinner span:nth-child(4) { transform: rotate(135deg) translateY(-4.5px); animation-delay: -0.5625s; }
.lattice-spinner span:nth-child(5) { transform: rotate(180deg) translateY(-4.5px); animation-delay: -0.45s; }
.lattice-spinner span:nth-child(6) { transform: rotate(225deg) translateY(-4.5px); animation-delay: -0.3375s; }
.lattice-spinner span:nth-child(7) { transform: rotate(270deg) translateY(-4.5px); animation-delay: -0.225s; }
.lattice-spinner span:nth-child(8) { transform: rotate(315deg) translateY(-4.5px); animation-delay: -0.1125s; }

@keyframes lattice-spinner-fade {
  0%   { opacity: 1; }
  100% { opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
  .lattice-spinner span {
    animation: none;
    opacity: 0.75;
  }
}

.lattice-panel {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  min-width: 14rem;
  width: 25vw;
  /* background: var(--bg); */
  border: 1px solid var(--line);
  padding: 1rem 1.25rem 1rem 1rem;
  font-family: var(--font) !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.65rem);
  transition:
    opacity 0.32s ease,
    transform 0.32s ease,
    visibility 0.32s ease;
}

.lattice-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.lattice-panel[hidden] {
  display: none;
}

.lattice-panel__inner {
  max-height: min(50vh, 20rem);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  &::-webkit-scrollbar {
    display: none;
  }
}

.lattice-panel__prose {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.06em;
}

.lattice-panel__prose p {
  margin: 0 0 0.85rem;
  line-height: 1;
}

.lattice-panel__prose p:last-child {
  margin-bottom: 0;
}

.lattice-panel__prose a {
  text-decoration: underline;
  /* text-underline-offset: 2px; */
}

.lattice-panel__figure {
  margin: 0;
}

.lattice-panel__figure img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.65rem;
  border: 1px solid var(--line);
}

.lattice-panel__figure figcaption {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
  letter-spacing: 0.05em;
}

.lattice-panel__list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.lattice-panel__list-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.lattice-panel__list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lattice-panel__list-item strong {
  display: block;
  color: var(--fg);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 9px;
  margin-bottom: 0.25rem;
}

.lattice-panel__meta {
  display: block;
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: 0.35rem;
}

.lattice-panel__list-item p {
  margin: 0;
  font-size: 9px;
}

.lattice-panel__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.lattice-panel__close:hover {
  color: var(--accent);
}

/* Fullscreen overlay page — blurs the lattice behind it */
.lattice-panel--overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  top: 0;
  left: 0;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none;
  border: none;
  transform: translateY(0.65rem);
}

.lattice-panel--overlay.is-open {
  transform: translateY(0);
}

.lattice-panel--overlay .lattice-panel__inner {
  max-height: min(80vh, 36rem);
  max-width: 46rem;
  width: 100%;
}

.lattice-panel--overlay .lattice-panel__prose {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.lattice-panel--overlay .lattice-panel__close {
  top: 1.25rem;
  right: 1.25rem;
  width: 2rem;
  height: 2rem;
  font-size: 22px;
}

.lattice-footer {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  /* gap: 2rem; */
  justify-content: space-between;
  align-items: flex-end;
  z-index: 200;
}
.lattice-footer-content {
  display: flex;
  gap: 2rem;
  align-items: flex-end;
}
.lattice-footer-content * {
  color: grey;
  font-size: 10px;
}
.footer-links {
  display: flex;
  flex-direction: column;
}
.lattice-intro {
  max-width: 28ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 10px;
  font-family: var(--font);
  background: var(--bg);
  padding-right: 1rem;
}

.lattice-controls {
  pointer-events: auto;
  background: var(--bg);
  padding: 0.25rem 0 0.25rem 0.25rem;
  display: none;
}

.lattice-swirl-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 11rem;
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.lattice-swirl-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.lattice-swirl-control input[type='range'] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.lattice-regenerate {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lattice-regenerate:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.lattice-seed {
  margin-top: 0.5rem;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  font-family: var(--font);
}

/* ── Inner pages ── */

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);

height: 30px;}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font);

height: 30px;}

.page-header a {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-family: var(--font);

height: 30px;}

.page-header nav {
  display: flex;
  gap: 2rem;

height: 30px;}

.page-header nav a {
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 10px;
  font-family: var(--font);
}

.page-main {
  padding: 3rem 2rem;
  max-width: 52rem;
  font-family: var(--font);
}

.page-main h1 {
  margin: 0 0 2rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: var(--font);
}

.page-main .prose {
  color: var(--muted);
  line-height: 1.9;
  font-size: 12px;
  font-family: var(--font);
}

.page-main .prose p {
  margin: 0 0 1.5rem;
}

.page-lattice-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
  background: var(--bg);
}

.page-footer {
  padding: 2rem;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.15em;
  font-family: var(--font);
}

/* ── Program grid ── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  border: 1px solid var(--line);
  padding: 1.5rem;
  transition: border-color 0.2s ease;
  font-family: var(--font);
}

.project-card:hover {
  border-color: var(--fg);
}

.project-card h2 {
  margin: 0 0 0.5rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font);
}

.project-card .meta {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  font-family: var(--font);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 11px;
  font-family: var(--font);
}

@media (max-width: 640px) {
  /* .lattice-header,
  .lattice-footer {
    left: 1.25rem;
    right: 1.25rem;
  } */

  .page-header nav {
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lattice-panel {
    transition: none;
  }
}
html,
body,
button,
input,
textarea,
select {
  font-family: 'Arial', monospace !important;
}
.lattice-header,
.lattice-header-text,
.lattice-header-text p {
  font-family: 'Arial', monospace !important;
}
.footer-newsletter {
  position: fixed;
  bottom: 0;
  right: 0;
  padding: 2rem;
  z-index: 1000;
}
.footer-newsletter * {
  color: var(--accent) !important;
}
/* Newsletter signup (Mailjet) */
.newsletter-form {
  /* margin-top: 0.5rem;
  max-width: 22ch; */
  font-family: inherit;
  font-size: 10px;
  color: inherit;
  position: relative;
  background-color: var(--accenty);
  padding: 0.5rem;
  border: inset;
  border-color: var(--accenty);
}
.newsletter-label {
  display: block;
  font-family: 'Arial';
  font-weight: bold;
  font-size: 
  /* margin-bottom: 0.2rem; */
}
.newsletter-row {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
}
.newsletter-input {
  flex: 1;
  min-width: 0;
  border: none;
  /* border-bottom: 1px solid currentColor; */
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  padding: 0.1rem 0;
  color: inherit;
  outline: none;
}
.newsletter-input::placeholder {
  opacity: 0.5;
  color: inherit;
}
.newsletter-submit {
  border: none;
  background: none;
  font-family: 'Arial', monospace !important;
  font-size: inherit;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}
.newsletter-submit:disabled {
  opacity: 0.5;
  cursor: default;
}
.newsletter-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.newsletter-status {
  margin: 0.35rem 0 0;
  font-size: inherit;
}

.lattice-panel__prose .newsletter-form {
  /* margin-top: 1rem;
  max-width: 28ch; */
  font-size: 10px;
  color: var(--fg);
}
@media (max-width: 480px) {
  .lattice-panel {
    width: 80vw;
  }

  .lattice-panel--overlay {
    width: 100%;
    padding: 4rem 1.25rem 1.5rem;
  }
  .lattice-header {
    flex-direction: column;
    gap: 1rem;
  }
  .lattice-header-text p {
    font-size: 10px !important;
    margin: 0;
  }
  .lattice-logo {
    /* height: 80px; */
    height: auto;
    width: 100%;
  }
  .lattice-header {
    top: 0;
    left: 0;
    padding: 1rem;
  }
  .lattice-footer-content {
    gap: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .lattice-footer-content .footer-credits {
    opacity: 0.5;
  }
  .lattice-header-text {
    gap: 1rem;
    flex-direction: column;
  }
  .lattice-header-text-left {
    /* width: 70%; */
  }
  .lattice-header-text-left p {
    font-family: 'Helvetica';
    font-weight: bold;
    /* font-size: 15px !important; */
    width: 100%;
    margin: unset;
    color: var(--fg) !important;
    letter-spacing: unset !important;
    line-height: 1 !important;
    hyphens: none !important;
  }
  .lattice-header-text-right {
    width: 100%;
  }
  .lattice-header-text-right p {
    font-family: 'Helvetica';
    font-weight: bold;
    /* font-size: 15px !important; */
    /* width: 60%; */
    margin: unset;
    color: var(--fg) !important;
    letter-spacing: unset !important;
    line-height: 1 !important;
    hyphens: none !important;
  }
  .lattice-footer {
    left: 0;
    bottom: 0;
    padding: 1rem;
    width: 100%;
  }
  .footer-links * {
    font-size: 8px !important;
  }
  .footer-credits * {
    font-size: 8px !important;
  }
  .lattice-footer-content {
    width: 100%;
  }
  .footer-newsletter {
    padding: 0;
    position: unset;
    width: 100%;
  }
  .footer-newsletter * {
    color: var(--accent) !important;
  }
}