/* ==========================================================================
   provider.pt — PHOSPHOR/TTY
   A retro-BBS design system: phosphor green on deep glass, scanlines,
   mono type, and a WebGL project network at the center of it all.
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../fonts/ibm-plex-mono-latin-400-normal-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("../fonts/ibm-plex-mono-latin-500-normal-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("../fonts/ibm-plex-mono-latin-600-normal-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("../fonts/vt323-latin-400-normal-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #060a08;
  --bg-2: #0a110c;
  --panel: #0b130e;
  --line: rgba(102, 255, 166, 0.16);
  --line-strong: rgba(102, 255, 166, 0.4);
  --ink: #d3f5dd;
  --ink-dim: #82ab90;
  --ink-faint: #51705c;
  --phos: #46ff9e;
  --amber: #ffc95c;
  --cyan: #53d9ff;
  --magenta: #ff63b0;
  --red: #ff6b6b;
  --font-disp: "VT323", "IBM Plex Mono", monospace;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --head-h: 58px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset / base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--head-h);
  scroll-snap-type: y mandatory;
}
html.is-mobile-list-flow { scroll-snap-type: none; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(70, 255, 158, 0.07), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(83, 217, 255, 0.05), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(70, 255, 158, 0.28); color: #eafff0; }

a { color: var(--phos); text-decoration: none; }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--phos);
  color: #04120a;
  font-weight: 600;
  font-size: 13px;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- CRT overlay ---------- */

.crt {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}
.crt::before {
  content: " ";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.045), rgba(0, 255, 70, 0.015), rgba(0, 60, 255, 0.045));
  background-size: 100% 3px, 4px 100%;
}
.crt::after {
  content: " ";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(2, 6, 4, 0.55) 100%);
  animation: crt-flicker 4.2s ease-in-out infinite;
}
@keyframes crt-flicker {
  0%, 100% { opacity: 0.9; }
  48% { opacity: 1; }
  52% { opacity: 0.82; }
  56% { opacity: 0.97; }
}

/* ---------- blinking block caret ---------- */

.caret::after {
  content: "▮";
  margin-left: 0.12em;
  color: var(--phos);
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

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

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--head-h);
  background: rgba(6, 10, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head__inner {
  width: min(1280px, 100%);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: clamp(16px, 4vw, 48px);
}

.wordmark {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.14em;
  white-space: nowrap;
  cursor: pointer;
}
.wordmark__dot { color: var(--phos); }
.wordmark__tail { color: var(--ink-faint); }
.wordmark__compact { display: none; }
.wordmark:hover { text-shadow: 0 0 14px rgba(70, 255, 158, 0.5); }

.site-nav {
  display: flex;
  gap: clamp(10px, 2.2vw, 26px);
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav button {
  position: relative;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  padding: 6px 2px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, text-shadow 0.15s;
}
.site-nav button::after {
  content: " ";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--phos);
  transition: right 0.25s var(--ease-out), box-shadow 0.2s;
}
.site-nav button.is-active {
  color: var(--phos);
  text-shadow: 0 0 10px rgba(70, 255, 158, 0.55);
}
.site-nav button.is-active::after {
  right: 0;
  box-shadow: 0 0 10px rgba(70, 255, 158, 0.65);
}
@media (hover: hover) and (pointer: fine) {
  .site-nav button:hover {
    color: var(--phos);
    text-shadow: 0 0 10px rgba(70, 255, 158, 0.55);
  }
  .site-nav button:hover::after {
    right: 0;
    box-shadow: 0 0 10px rgba(70, 255, 158, 0.65);
  }
}
.site-nav button.is-active .site-nav__idx { color: var(--phos); }
.site-nav__idx {
  color: var(--ink-faint);
  margin-right: 6px;
  font-size: 10px;
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--head-h) + 40px) 0 90px;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: 40% -25% -12% -25%;
  background-image:
    linear-gradient(rgba(70, 255, 158, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 255, 158, 0.14) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(340px) rotateX(63deg) translateY(0);
  will-change: transform;
  -webkit-mask-image: linear-gradient(to top, black 25%, transparent 92%);
  mask-image: linear-gradient(to top, black 25%, transparent 92%);
  animation: grid-walk 1.25s linear infinite;
}
@keyframes grid-walk {
  from { transform: perspective(340px) rotateX(63deg) translateY(0); }
  to { transform: perspective(340px) rotateX(63deg) translateY(46px); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

.hero__title {
  margin: 0;
  max-width: 900px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(42px, 5.6vw, 78px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  color: #eafff0;
  text-shadow:
    0 0 22px rgba(70, 255, 158, 0.35),
    3px 0 rgba(255, 63, 116, 0.3),
    -3px 0 rgba(83, 217, 255, 0.3);
}

.hero__sub {
  margin: 22px 0 34px;
  max-width: 52ch;
  color: var(--ink-dim);
  font-size: clamp(14px, 1.6vw, 16px);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-block;
  padding: 12px 26px 10px;
  font-family: var(--font-disp);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--phos);
  border: 1px solid var(--line-strong);
  background: rgba(70, 255, 158, 0.05);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.btn:hover {
  background: var(--phos);
  color: #04120a;
  box-shadow: 0 0 26px rgba(70, 255, 158, 0.4);
  transform: translateY(-1px);
}
.btn--ghost {
  color: var(--ink-dim);
  border-color: var(--line);
  background: transparent;
}
.btn--ghost:hover {
  background: rgba(255, 201, 92, 0.12);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 22px rgba(255, 201, 92, 0.22);
}

.hero__scrollhint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-disp);
  font-size: 19px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  animation: hint-bob 2.4s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

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

.section {
  --section-gutter: clamp(16px, 4vw, 48px);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(72px, 10vw, 128px)
    max(var(--section-gutter), calc((100% - 1280px) / 2 + 48px))
    32px;
}

main > section {
  min-height: calc(100svh - var(--head-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  opacity: var(--section-opacity, 1);
}

.section__head { margin-bottom: 38px; }
.section__no {
  margin: 0 0 4px;
  font-family: var(--font-disp);
  font-size: 22px;
  color: var(--ink-faint);
}
.section__title {
  margin: 0;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: #eafff0;
  text-shadow:
    2px 0 rgba(255, 63, 116, 0.22),
    -2px 0 rgba(83, 217, 255, 0.22);
}
.section__sub {
  margin: 16px 0 0;
  max-width: 64ch;
  color: var(--ink-dim);
  font-size: 14.5px;
}
.section__sub strong { color: var(--ink); font-weight: 600; }

/* ---------- network: stage ---------- */

.network {
  position: relative;
  isolation: isolate;
  max-width: none;
  min-height: max(680px, calc(100svh - var(--head-h)));
  padding-inline: 0;
  overflow: hidden;
}

.network .section__head {
  position: relative;
  z-index: 4;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 48px);
  pointer-events: none;
}

.net-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 7px 11px 6px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 8, 0.72);
  color: var(--ink-dim);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.net-view-toggle:hover,
.net-view-toggle:focus-visible,
.net-view-toggle[aria-pressed="true"] {
  color: var(--phos);
  border-color: var(--line-strong);
  background: rgba(16, 45, 27, 0.82);
  box-shadow: 0 0 18px rgba(70, 255, 158, 0.12);
}

.network__stage {
  position: absolute;
  z-index: 0;
  inset: 0;
}

.net-canvas-wrap {
  position: relative;
  height: 100%;
  background:
    radial-gradient(ellipse 90% 70% at 50% 42%, rgba(20, 40, 26, 0.55), transparent 70%);
  overflow: hidden;
}

#net-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  transition: opacity 0.38s ease, filter 0.38s ease, transform 0.55s var(--ease-out);
}
#net-canvas.is-wheel-zoom { cursor: zoom-in; }
#net-canvas:active { cursor: grabbing; }

.net-boot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-disp);
  font-size: 24px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  background: rgba(6, 10, 8, 0.5);
  transition: opacity 0.4s;
}
.net-boot.is-off { opacity: 0; pointer-events: none; }

.net-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-disp);
  font-size: 19px;
  letter-spacing: 0.12em;
  color: var(--tag-c, var(--phos));
  text-shadow:
    0 0 10px color-mix(in srgb, var(--tag-c, var(--phos)) 55%, transparent),
    1px 0 2px #030604, -1px 0 2px #030604, 0 1px 2px #030604, 0 -1px 2px #030604;
  pointer-events: none;
  transition: opacity 0.2s;
}
.net-tip {
  position: absolute;
  z-index: 5;
  transform: translate(14px, -50%);
  padding: 7px 11px;
  width: max-content;
  max-width: min(420px, calc(100vw - 48px));
  background: rgba(6, 12, 8, 0.92);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  white-space: normal;
}
.net-tip.is-on { opacity: 1; }
.net-tip .net-tip__name {
  font-family: var(--font-disp);
  font-size: 19px;
  color: var(--phos);
  display: block;
  overflow-wrap: anywhere;
}
.net-tip .net-tip__hint { color: var(--ink-faint); font-size: 10.5px; letter-spacing: 0.1em; }

.net-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--ink-dim);
}
.net-fallback[hidden] { display: none; }

/* ---------- network: list view ---------- */

.net-list {
  position: absolute;
  z-index: 4;
  top: clamp(395px, 46%, 420px);
  right: max(clamp(16px, 4vw, 48px), calc((100% - 1280px) / 2 + 48px));
  bottom: 18px;
  left: max(clamp(16px, 4vw, 48px), calc((100% - 1280px) / 2 + 48px));
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.55s;
}

.net-list__legend {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  min-height: 28px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.net-list__category,
.net-list__project {
  --origin-x: 0px;
  --origin-y: 0px;
  transform: translate(var(--origin-x), var(--origin-y)) scale(0.35);
  transform-origin: left center;
  opacity: 0;
  transition: transform 0.52s var(--ease-out), opacity 0.22s ease;
}

.net-list__category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: var(--node-c);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-shadow: 0 0 10px color-mix(in srgb, var(--node-c) 45%, transparent);
  cursor: pointer;
}
.net-list__category:hover,
.net-list__category:focus-visible,
.net-list__category[aria-pressed="true"] {
  color: #061008;
  background: var(--node-c);
  outline: 1px solid var(--node-c);
  outline-offset: 2px;
  text-shadow: none;
  box-shadow: 0 0 13px color-mix(in srgb, var(--node-c) 48%, transparent);
}

.net-list__projects {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 15px;
  grid-auto-flow: row;
  align-content: start;
  column-gap: 28px;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.net-list__item {
  min-width: 0;
  min-height: 15px;
}
.net-list__item[hidden] { display: none; }

.net-list__project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 15px;
  width: 100%;
  height: 100%;
  padding: 0 5px;
  border: 0;
  border-bottom: 1px solid rgba(44, 102, 62, 0.14);
  background: rgba(6, 12, 8, 0.34);
  color: var(--ink-dim);
  font: 400 10.5px/1 var(--font-mono);
  text-align: left;
  cursor: pointer;
}
.net-list__item:nth-child(4n + 2) .net-list__project,
.net-list__item:nth-child(4n + 3) .net-list__project { background: rgba(13, 26, 17, 0.44); }
.net-list__project:hover,
.net-list__project:focus-visible {
  z-index: 1;
  color: var(--ink);
  background: color-mix(in srgb, var(--node-c) 10%, rgba(6, 12, 8, 0.88));
  outline: 1px solid color-mix(in srgb, var(--node-c) 60%, transparent);
  outline-offset: -1px;
}

.net-list__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.net-list__types {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.net-list__type {
  color: var(--type-c);
  text-shadow: 0 0 8px color-mix(in srgb, var(--type-c) 38%, transparent);
}

.network.is-list-view #net-canvas {
  opacity: 0.13;
  filter: blur(1px) saturate(0.6);
  transform: scale(1.025);
  pointer-events: none;
}
.network.is-list-view .net-label,
.network.is-list-view .net-tip { opacity: 0 !important; }
.network.is-list-view .net-fallback { display: none; }
.network.is-list-view .net-list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.network.is-list-view .net-list__category,
.network.is-list-view .net-list__project {
  transform: translate(0, 0) scale(1);
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 7ms);
}

/* ---------- network: file box ---------- */

.net-side {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  width: min(440px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  padding: 22px 24px 24px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 12, 8, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 24px rgba(70, 255, 158, 0.08);
  overflow-y: auto;
  transform: translateY(calc(100% + 20px));
  transition: transform 0.3s var(--ease-out);
}
.net-side.is-open { transform: translateY(0); }

.detail__eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}
.detail__name {
  margin: 6px 0 12px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 0.95;
  color: #eafff0;
  overflow-wrap: anywhere;
}
.detail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail__description {
  margin: 0 0 14px;
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.65;
}
.detail__actions { display: flex; gap: 10px; margin-top: 20px; }
.detail__actions .btn { font-size: 20px; padding: 9px 18px 7px; }

.tag {
  --tag-c: var(--phos);
  padding: 1px 6px 0;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--tag-c);
  border: 1px solid color-mix(in srgb, var(--tag-c) 42%, transparent);
  border-radius: 2px;
  white-space: nowrap;
}

.network__note {
  margin: 16px 2px 0;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ---------- workshop ---------- */

.workshop,
.about,
.contact {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.workshop > :not(.workshop-contact),
.about > *,
.contact > * {
  position: relative;
  z-index: 2;
}

.workshop::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: calc((100svh - var(--head-h)) / 2);
  width: min(92vw, calc(100svh - var(--head-h) - 48px), 1080px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 72%, rgba(70, 255, 158, 0.18) 88%, transparent 100%),
    repeating-radial-gradient(circle, transparent 0 9.5%, rgba(70, 255, 158, 0.11) 9.7% 9.9%, transparent 10.1% 19%);
  -webkit-mask-image: radial-gradient(circle, black 0 58%, transparent 76%);
  mask-image: radial-gradient(circle, black 0 58%, transparent 76%);
  animation: workshop-radar 14s linear infinite;
  pointer-events: none;
}

.workshop-contact {
  position: absolute;
  z-index: 1;
  width: 42px;
  height: 42px;
  color: var(--phos);
  opacity: 0;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px rgba(70, 255, 158, 0.9));
  pointer-events: none;
}

.workshop-contact__icon,
.workshop-contact__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.workshop-contact__label {
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  color: var(--phos);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.13em;
  text-shadow: 0 0 8px rgba(70, 255, 158, 0.9);
  white-space: nowrap;
  transform: translateX(-50%);
}

.workshop-contact::before,
.workshop-contact::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
}

.workshop-contact.is-detected {
  animation: radar-contact 2.2s steps(1) both;
}

.workshop-contact.is-detected::before { animation: radar-plim 1.35s var(--ease-out) both; }
.workshop-contact.is-detected::after { animation: radar-plim 1.35s 0.28s var(--ease-out) both; }

@keyframes workshop-radar {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes radar-contact {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.72); }
  5% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  10% { opacity: 0.28; }
  14%, 74% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

@keyframes radar-plim {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(3.4); }
}

.workshop__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.workshop__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  background: rgba(10, 17, 12, 0.5);
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.workshop__card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4), 0 0 20px rgba(70, 255, 158, 0.08);
}
.workshop__card::before {
  content: "● ONLINE";
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--phos);
  opacity: 0.75;
}
.workshop__sig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(70, 255, 158, 0.06);
  font-family: var(--font-disp);
  font-size: 34px;
  color: var(--phos);
  text-shadow: 0 0 12px rgba(70, 255, 158, 0.5);
}
.workshop__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.workshop__role {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- about: code editor ---------- */

.editor {
  max-width: 980px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 9, 7, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), 0 0 34px rgba(70, 255, 158, 0.05);
}
.editor__tabs {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 22, 16, 0.96);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.editor__workspace,
.editor__path {
  display: flex;
  align-items: center;
  padding: 0 14px;
}
.editor__workspace {
  color: var(--ink);
}
.editor__path {
  justify-content: flex-end;
  color: var(--ink-faint);
}
.editor__lines {
  margin: 0;
  padding: 20px 24px 22px 62px;
  counter-reset: editor-line;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.editor__lines li {
  position: relative;
  min-height: 1.55em;
  padding-left: 12px;
  counter-increment: editor-line;
}
.editor__lines li::marker {
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.editor__lines li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(102, 255, 166, 0.08);
}
.editor__blank { opacity: 0.38; }
.editor__heading { color: var(--cyan); font-weight: 600; }
.editor__strong { color: var(--amber); }
.editor__bullet { color: var(--phos); font-weight: 600; }
.editor__cursor {
  display: inline-block;
  width: 0.68em;
  height: 1.15em;
  margin-left: 3px;
  vertical-align: -0.18em;
  background: var(--phos);
  box-shadow: 0 0 10px rgba(70, 255, 158, 0.5);
  animation: blink 1.05s steps(1) infinite;
}
.editor__status {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 28px;
  padding-right: 12px;
  background: rgba(70, 255, 158, 0.1);
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.editor__mode {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #04120a;
  background: var(--phos);
  font-weight: 600;
}
.editor__position { margin-left: auto; }

/* ---------- about: drifting data tape ---------- */

.about::before {
  content: "01001110 01000101 01010100  //  PROVIDER  //  BUILD SHIP REPEAT  //  1998\A 00110111 01000101 01000010  //  HAND BUILT  //  NO TEMPLATES  //  ONLINE\A 01000001 01010000 01010000  //  WEB MOBILE IOT  //  BRAGA PORTO";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 112vw;
  color: rgba(70, 255, 158, 0.055);
  font-family: var(--font-disp);
  font-size: clamp(52px, 7.5vw, 138px);
  line-height: 0.86;
  letter-spacing: 0.04em;
  white-space: pre;
  transform: translate(-50%, -50%) rotate(-7deg);
  animation: data-tape 16s linear infinite alternate;
  pointer-events: none;
}

.about::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 100%;
  background: repeating-linear-gradient(90deg, transparent 0 8vw, rgba(83, 217, 255, 0.035) 8vw calc(8vw + 1px));
  transform: translate(-50%, -50%);
  animation: data-scan 7s steps(7) infinite;
  pointer-events: none;
}

@keyframes data-tape {
  from { transform: translate(-53%, -47%) rotate(-7deg); }
  to { transform: translate(-47%, -53%) rotate(-7deg); }
}

@keyframes data-scan {
  0%, 88%, 100% { opacity: 0.2; }
  90% { opacity: 0.75; }
  94% { opacity: 0.12; }
}

/* ---------- contact ---------- */

.contact {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 201, 92, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 90% 34%, rgba(83, 217, 255, 0.62) 0 1px, transparent 2px),
    radial-gradient(circle at 73% 48%, rgba(70, 255, 158, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 95% 11%, rgba(211, 245, 221, 0.55) 0 1px, transparent 2px);
}

.contact::before,
.contact::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 64%;
  top: 78%;
  width: clamp(520px, 58vw, 1000px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 10%, rgba(70, 255, 158, 0.5) 10.15% 10.55%, transparent 10.8% 20%);
  -webkit-clip-path: polygon(50% 0, 100% 0, 100% 50%, 50% 50%);
  clip-path: polygon(50% 0, 100% 0, 100% 50%, 50% 50%);
  filter: drop-shadow(0 0 12px rgba(70, 255, 158, 0.38));
  animation: space-broadcast 5.2s var(--ease-out) infinite;
  pointer-events: none;
}

.contact::after {
  background: repeating-radial-gradient(circle, transparent 0 12.5%, rgba(83, 217, 255, 0.4) 12.65% 13.05%, transparent 13.3% 25%);
  animation-delay: -2.6s;
}

@keyframes space-broadcast {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(0.16); }
  14% { opacity: 0.78; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.65); }
}

.contact__lines { max-width: 900px; }
.contact__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: padding-left 0.2s var(--ease-out), background 0.2s;
}
.contact__line:first-child { border-top: 1px solid var(--line); }
.contact__line:hover {
  padding-left: 16px;
  background: rgba(70, 255, 158, 0.05);
}
.contact__cmd {
  font-family: var(--font-disp);
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
  color: var(--phos);
  text-shadow: 0 0 12px rgba(70, 255, 158, 0.3);
  overflow-wrap: anywhere;
}
.contact__cmd::before {
  content: "$ ";
  color: var(--ink-faint);
}
.contact__desc {
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

/* ---------- footer ---------- */

.site-foot {
  margin-top: 90px;
  padding: 70px 0 46px;
  border-top: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
  scroll-snap-align: end;
}
.site-foot__mark {
  display: inline-block; /* shrink-wraps the text so JS can measure and fit it */
  margin: 0 0 18px;
  font-family: var(--font-disp);
  font-weight: 400;
  font-size: clamp(56px, 16vw, 400px); /* JS then fits it exactly to the footer width */
  line-height: 0.82;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: rgba(70, 255, 158, 0.34);
  text-shadow: 0 0 8px rgba(70, 255, 158, 0.26), 0 0 34px rgba(70, 255, 158, 0.12);
  user-select: none;
}
.site-foot__line {
  margin: 6px 0;
  padding: 0 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}
.site-foot__line a,
.site-foot__button { color: var(--ink); }
.site-foot__line a:hover,
.site-foot__button:hover { color: var(--phos); }
.site-foot__button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

/* ---------- privacy & cookies ---------- */

html.privacy-document { scroll-snap-type: none; }
.privacy-document body { min-height: 100svh; }
.privacy-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: calc(var(--head-h) + clamp(52px, 8vw, 96px)) clamp(16px, 4vw, 48px) 84px;
}
.privacy-back {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.privacy-back:hover { color: var(--phos); }
.site-head .privacy-back { margin: 0; }
.privacy-title {
  margin: 0;
  color: #eafff0;
  font: 400 clamp(48px, 8vw, 86px)/0.92 var(--font-disp);
  letter-spacing: 0.02em;
  text-shadow: 2px 0 rgba(255, 63, 116, 0.22), -2px 0 rgba(83, 217, 255, 0.22);
}
.privacy-lead {
  max-width: 66ch;
  margin: 22px 0 48px;
  color: var(--ink-dim);
  font-size: 15px;
}
.privacy-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.privacy-section h2 {
  margin: 0 0 12px;
  color: var(--phos);
  font: 400 30px/1 var(--font-disp);
  letter-spacing: 0.04em;
}
.privacy-section h3 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.privacy-section p,
.privacy-section li {
  max-width: 76ch;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.75;
}
.privacy-section ul { margin: 12px 0 0; padding-left: 20px; }
.privacy-section strong { color: var(--ink); }
.privacy-table-wrap { margin-top: 16px; overflow-x: auto; }
.privacy-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 12px;
}
.privacy-table th,
.privacy-table td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.privacy-table th {
  color: var(--phos);
  background: rgba(70, 255, 158, 0.05);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.privacy-table td { color: var(--ink-dim); }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.privacy-updated { color: var(--ink-faint); font-size: 11px; }

/* ---------- cookie consent ---------- */

#cc-main {
  --cc-font-family: var(--font-mono);
  --cc-modal-border-radius: 0;
  --cc-btn-border-radius: 0;
  --cc-bg: #070d09;
  --cc-primary-color: var(--ink);
  --cc-secondary-color: var(--ink-dim);
  --cc-btn-primary-bg: var(--phos);
  --cc-btn-primary-color: #04120a;
  --cc-btn-primary-border-color: var(--phos);
  --cc-btn-primary-hover-bg: #83ffba;
  --cc-btn-primary-hover-color: #04120a;
  --cc-btn-primary-hover-border-color: #83ffba;
  --cc-btn-secondary-bg: rgba(70, 255, 158, 0.06);
  --cc-btn-secondary-color: var(--ink);
  --cc-btn-secondary-border-color: var(--line-strong);
  --cc-btn-secondary-hover-bg: rgba(70, 255, 158, 0.14);
  --cc-btn-secondary-hover-color: var(--phos);
  --cc-btn-secondary-hover-border-color: var(--phos);
  --cc-separator-border-color: var(--line);
  --cc-toggle-on-bg: var(--phos);
  --cc-toggle-off-bg: #365442;
  --cc-toggle-on-knob-bg: #04120a;
  --cc-toggle-off-knob-bg: var(--ink);
  --cc-toggle-readonly-bg: #21382a;
  --cc-toggle-readonly-knob-bg: var(--ink-dim);
  --cc-cookie-category-block-bg: rgba(70, 255, 158, 0.035);
  --cc-cookie-category-block-border: var(--line);
  --cc-cookie-category-block-hover-bg: rgba(70, 255, 158, 0.075);
  --cc-cookie-category-block-hover-border: var(--line-strong);
  --cc-cookie-category-expanded-block-bg: transparent;
  --cc-footer-bg: #050906;
  --cc-footer-color: var(--ink-dim);
  --cc-footer-border-color: var(--line);
  --cc-overlay-bg: rgba(1, 5, 3, 0.78);
}
#cc-main .cm,
#cc-main .pm { border: 1px solid var(--line-strong); box-shadow: 0 18px 70px rgba(0, 0, 0, 0.68), 0 0 30px rgba(70, 255, 158, 0.08); }
#cc-main .cm__title,
#cc-main .pm__title { color: #eafff0; font-family: var(--font-disp); font-size: 1.45em; font-weight: 400; letter-spacing: 0.04em; }
#cc-main .cm__btn,
#cc-main .pm__btn { font-size: 0.7em; letter-spacing: 0.08em; }

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

@media (max-width: 900px) {
  .workshop__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-head__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .wordmark {
    flex: 0 0 auto;
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .wordmark__full { display: none; }
  .wordmark__compact { display: inline; }
  .site-nav {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: clamp(6px, 1.7vw, 10px);
    overflow: visible;
  }
  .site-nav__idx { display: none; }
  .site-nav button {
    flex: 0 0 auto;
    padding: 6px 0;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 620px) {
  .hero { padding-bottom: 70px; }
  .workshop__grid { grid-template-columns: 1fr; }
  .workshop__card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
    min-height: 78px;
    padding: 13px 16px;
  }
  .workshop__sig {
    grid-row: 1 / span 2;
    width: 52px;
    height: 52px;
    margin-bottom: 0;
    font-size: 29px;
  }
  .workshop__name {
    grid-column: 2;
    align-self: end;
  }
  .workshop__role {
    grid-column: 2;
    align-self: start;
  }
  .workshop__card::before {
    content: "●";
    top: 50%;
    right: 14px;
    font-size: 8px;
    letter-spacing: 0;
    transform: translateY(-50%);
  }
  .network { min-height: max(620px, calc(100svh - var(--head-h))); }
  .contact__line { flex-direction: column; gap: 6px; }
  .net-side { width: min(300px, 88%); }
  .net-list {
    top: 380px;
    right: 16px;
    left: 16px;
  }
  .net-list__legend { gap: 10px; overflow-x: auto; }
  .net-list__projects { grid-template-columns: 1fr; grid-auto-rows: 22px; }
  .net-list__item,
  .net-list__project { min-height: 22px; }
  .network.is-list-view {
    min-height: 0;
    overflow: visible;
  }
  .network.is-list-view .network__stage {
    position: relative;
    inset: auto;
    margin-top: 24px;
  }
  .network.is-list-view .net-canvas-wrap {
    height: auto;
    overflow: visible;
  }
  .network.is-list-view #net-canvas { display: none; }
  .network.is-list-view .net-list {
    display: block;
    position: relative;
    inset: auto;
    margin-inline: 16px;
  }
  .network.is-list-view .net-list__legend {
    position: sticky;
    top: var(--head-h);
    z-index: 5;
    min-height: 42px;
    margin-bottom: 0;
    padding: 8px 0;
    background: rgba(6, 10, 8, 0.94);
    backdrop-filter: blur(10px);
  }
  .network.is-list-view .net-list__category { min-height: 28px; }
  .network.is-list-view .net-list__projects {
    display: grid;
    flex: none;
    height: auto;
    grid-auto-rows: minmax(42px, auto);
    overflow: visible;
  }
  .network.is-list-view .net-list__item,
  .network.is-list-view .net-list__project { min-height: 42px; }
  .network.is-list-view .net-list__project {
    padding-inline: 10px;
    font-size: 11.5px;
  }
  .network.is-list-view .net-side {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    width: calc(100% - 24px);
    max-height: calc(100svh - var(--head-h) - 24px);
  }
  .contact::before,
  .contact::after {
    left: 58%;
    top: 82%;
  }
}


/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .crt::after { animation: none; }
  .hero__scrollhint { animation: none; }
  .hero__grid { animation: none; }
  .net-side { transition: none; }
}
