/* ---- Robby Brosman portfolio — walking skeleton (Step 1) ---- */
:root {
  --bg: #0b0f1a;
  --ink: #f4f6fb;
  --ink-dim: #aab3c5;
  --accent: #7c5cff;
  --outline: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Open Sans", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

/* Layer 1 — mesh canvas fills the viewport, sits behind everything */
#mesh {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

/* Layer 3 — intro */
.intro {
  position: relative;
  z-index: 3;
  max-width: 46ch;
  padding: clamp(1.5rem, 5vw, 4rem);
  pointer-events: none; /* let clicks fall to tiles except on links */
}
.intro a { pointer-events: auto; }

.logo { color: var(--ink); display: inline-block; margin-bottom: 1.2rem; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }

.intro h1 {
  font-family: "Rubik Mono One", monospace;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 1.02;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  /* bold + outlined treatment */
  color: var(--ink);
  text-shadow:
    -1.5px -1.5px 0 rgba(0,0,0,.55), 1.5px -1.5px 0 rgba(0,0,0,.55),
    -1.5px  1.5px 0 rgba(0,0,0,.55), 1.5px  1.5px 0 rgba(0,0,0,.55);
}

.blurb {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 1.4rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.blurb a {
  color: #fff;
  text-decoration: none;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 1px;
  transition: border-color .2s;
}
.blurb a:hover { border-color: #fff; }

.social a { color: var(--ink); display: inline-flex; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); transition: color .2s, transform .2s; }
.social a:hover { color: var(--accent); transform: translateY(-2px); }

/* Layer 2 — project triangles live IN the canvas mesh (see main.js).
   #tiles now holds only invisible keyboard proxies, so it must never
   intercept pointer events — the canvas needs them for hover/click. */
#tiles {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Focusable but visually absent; the canvas renders the focus state. */
.tile-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
}
.tile-proxy:focus-visible {
  outline: none; /* the triangle itself expands + brightens on focus */
}

/* Layer 4 — modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 6, 12, 0.78); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(880px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #10141f;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-close {
  position: absolute; top: 10px; right: 14px; z-index: 2;
  background: rgba(0,0,0,.4); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
  line-height: 1;
}
.modal-close:hover { background: var(--accent); }
.modal-shot { background: #0b0f1a; }
.modal-shot img { display: block; width: 100%; height: auto; }
.modal-shot:empty, .modal-shot img:not([src]) { display: none; }
.modal-body { padding: clamp(1.2rem, 3vw, 2rem); }
.modal-body h2 { font-family: "Rubik Mono One", monospace; font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0 0 .6rem; }
.modal-body p { font-size: 1.1rem; line-height: 1.55; color: var(--ink-dim); margin: 0 0 1.4rem; }
.modal-link {
  display: inline-block; font-weight: 700; color: #fff; text-decoration: none;
  background: var(--accent); padding: .7rem 1.4rem; border-radius: 10px; transition: filter .2s;
}
.modal-link:hover { filter: brightness(1.12); }
.modal-link[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .modal-link, .social a { transition: none; }
}
