/* Netwyrk Dynamyx — LCD beige / Game & Watch portable aesthetic */

:root {
  --lcd-bg: #C9B896;
  --lcd-bg-hi: #D4C4A0;
  --lcd-inset: #B5A078;
  --lcd-deep: #A8946E;
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --ink-muted: #3a3428;
  --neon: #00D4E8;
  --neon-glow: rgba(0, 212, 232, 0.45);
  --bezel: #111111;
  --glass: rgba(255, 255, 255, 0.12);
  --shadow-inset: inset 0 2px 6px rgba(0, 0, 0, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.15);
  --font-display: 'Orbitron', system-ui, sans-serif;
  --font-body: 'IBM Plex Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --max: 820px;
  --max-narrow: 640px;
}

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

img, video, iframe, audio {
  max-width: 100%;
}

audio {
  display: block;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--lcd-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Faint LCD pixel grid + horizontal scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.035) 3px,
      rgba(0, 0, 0, 0.035) 4px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 3px,
      rgba(0, 0, 0, 0.02) 3px,
      rgba(0, 0, 0, 0.02) 4px
    );
  mix-blend-mode: multiply;
}

/* Soft vignette + glass sheen */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 49;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at center, transparent 40%, rgba(90, 70, 40, 0.18) 100%);
}

.container {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  padding: 24px 20px 40px;
  text-align: center;
  margin: 0 auto;
  flex: 1;
}

.container--narrow {
  max-width: var(--max-narrow);
}

h1, h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-weight: 700;
  margin: 1.2em 0 0.6em;
}

h1 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
}

h2 {
  font-size: clamp(1.05rem, 3vw, 1.25rem);
}

p {
  margin: 0.75em 0;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--ink-muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

a:hover,
a:focus-visible {
  color: var(--bezel);
  background: var(--neon);
  border-bottom-color: transparent;
  outline: none;
}

a:focus-visible {
  box-shadow: 0 0 0 3px var(--neon-glow);
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
  animation: blink 1.1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* —— Header / logo —— */
.site-header {
  text-align: center;
  margin-bottom: 8px;
}

.logo {
  display: block;
  max-width: min(380px, 92%);
  width: 100%;
  height: auto;
  margin: 4px auto 8px;
  border: none;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

/* —— Nav —— */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin: 18px 0 28px;
  padding: 10px 8px;
  background: var(--lcd-inset);
  border: 2px solid var(--bezel);
  box-shadow: var(--shadow-inset);
}

.site-nav a {
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 6px 10px;
  color: var(--ink);
  border: 1px solid transparent;
}

.site-nav a:hover {
  background: var(--bezel);
  color: var(--lcd-bg-hi);
}

.site-nav a.active {
  background: var(--bezel);
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 10px var(--neon-glow);
}

.site-nav a.active:hover {
  color: var(--neon);
  background: #000;
}

/* —— Footer —— */
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 24px auto 20px;
  padding: 18px 20px;
  border-top: 2px solid var(--bezel);
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
}

.site-footer a {
  color: var(--ink);
}

.site-footer .footer-logo {
  max-width: 56px;
  height: auto;
  margin-bottom: 8px;
  opacity: 0.7;
  filter: grayscale(1) contrast(1.1);
  border: 1px solid var(--bezel);
}

/* —— LCD module panels —— */
.lcd-module,
.status-banner,
.photo-box,
.experiment-card,
.glyph-log,
.ig-card,
.contact-list li,
.instructions {
  background: var(--lcd-inset);
  border: 2px solid var(--bezel);
  box-shadow: var(--shadow-inset);
}

.status-banner {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  letter-spacing: 0.06em;
  margin: 24px auto;
  padding: 14px 16px;
  max-width: 520px;
  text-transform: uppercase;
}

.status-banner a {
  border-bottom: 1px solid var(--neon);
  color: var(--ink);
}

.status-banner a:hover {
  background: var(--neon);
  color: var(--bezel);
}

.cta-button {
  display: inline-block;
  background: var(--bezel);
  color: var(--neon);
  padding: 12px 28px;
  margin: 16px 0;
  border: 2px solid var(--neon);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 0 14px var(--neon-glow);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: var(--neon);
  color: var(--bezel);
  border-color: var(--bezel);
  box-shadow: 0 0 20px var(--neon-glow);
}

.hook {
  max-width: 560px;
  margin: 0 auto 20px;
  color: var(--ink-soft);
}

.boot-line {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* —— Music links —— */
.music-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}

.music-link-box {
  display: inline-block;
  background: var(--bezel);
  color: var(--lcd-bg-hi);
  padding: 10px 18px;
  border: 2px solid var(--bezel);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}

.music-link-box:hover,
.music-link-box:focus-visible {
  background: var(--neon);
  color: var(--bezel);
  border-color: var(--bezel);
  box-shadow: 0 0 12px var(--neon-glow);
}

/* —— Archive display frames —— */
.photo-box {
  padding: 14px;
  text-align: center;
  margin: 24px auto;
  max-width: 520px;
}

.archive-frame {
  background: var(--bezel);
  padding: 10px 10px 4px;
  margin: 0 auto 8px;
  max-width: 100%;
  box-shadow: inset 0 0 0 1px #333;
}

.archive-frame img,
.photo-box > img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.85) contrast(1.15) brightness(0.95);
}

.archive-caption,
.photo-box > p {
  margin: 8px 0 4px;
  font-size: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.player {
  width: 100%;
  max-width: 400px;
  margin: 8px 0 16px;
  height: 36px;
}

.demo-track {
  margin: 18px 0;
  text-align: left;
  padding: 0 8px;
}

.demo-track .track-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

/* —— Symbols —— */
.symbols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding: 12px;
  background: var(--lcd-inset);
  border: 2px solid var(--bezel);
  box-shadow: var(--shadow-inset);
}

.symbol {
  font-size: 22px;
  text-align: center;
  padding: 10px 4px;
  border: 1px dashed var(--ink-muted);
  color: var(--ink);
  transition: all 0.2s;
}

.symbol:hover {
  background: var(--bezel);
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 8px var(--neon-glow);
}

.symbol a {
  border-bottom: none;
  display: block;
  color: inherit;
}

.symbol a:hover {
  background: transparent;
  color: inherit;
}

/* —— Experiments —— */
.experiment-card {
  padding: 20px;
  margin: 20px auto;
  max-width: 520px;
  text-align: left;
  transition: box-shadow 0.25s;
}

.experiment-card:hover {
  box-shadow: var(--shadow-inset), 0 0 16px var(--neon-glow);
}

.experiment-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.glyph-log {
  text-align: left;
  margin: 24px auto;
  max-width: 520px;
  padding: 16px;
  font-size: 13px;
}

.glyph-log code {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
}

.prose-left {
  text-align: left;
}

.prose-left p {
  margin: 1em 0;
}

/* —— Contact —— */
.contact-list {
  text-align: left;
  max-width: 420px;
  margin: 20px auto;
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin: 12px 0;
  padding: 14px 16px;
}

.contact-list strong {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* —— Bread instructions —— */
.instructions {
  text-align: left;
  margin-top: 20px;
  padding: 20px;
}

.instructions h2 {
  margin-top: 1.4em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink-muted);
}

.instructions h2:first-child {
  margin-top: 0;
}

.instructions p {
  margin: 0.45em 0;
  padding-left: 0.5em;
  border-left: 2px solid transparent;
}

.instructions p:hover {
  border-left-color: var(--neon);
}

/* —— Instagram Field Transmissions —— */
.ig-feed {
  margin: 2.5rem 0;
  text-align: left;
}

.ig-feed h2 {
  text-align: center;
}

.ig-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

@media (min-width: 720px) {
  .ig-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ig-card {
  padding: 12px;
  text-align: left;
}

.ig-thumb-link {
  display: block;
  border-bottom: none;
  background: var(--bezel);
  padding: 8px 8px 4px;
  margin-bottom: 8px;
}

.ig-thumb-link:hover {
  background: var(--bezel);
  box-shadow: 0 0 12px var(--neon-glow);
}

.ig-thumb {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(0.7) contrast(1.1);
}

.ig-caption {
  margin: 0.5rem 0;
  font-size: 14px;
}

.ig-embed-wrap {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--ink-muted);
  padding-top: 0.75rem;
  opacity: 0.85;
}

.ig-embed-wrap .embed-label {
  font-size: 11px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.ig-embed {
  width: 100%;
  min-height: 480px;
  background: var(--bezel);
  border: 1px solid #333;
}

.arg-note {
  font-size: 12px;
  color: var(--ink-muted);
  max-width: 520px;
  margin: 16px auto;
  font-style: italic;
}

/* —— Responsive —— */
@media (max-width: 720px) {
  .container {
    padding: 12px 14px 28px;
    width: 100%;
  }

  .site-header {
    margin-bottom: 4px;
  }

  .logo {
    max-width: min(300px, 86vw);
    margin: 2px auto 6px;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    margin: 12px 0 20px;
  }

  .site-nav a {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 28%;
    max-width: calc(50% - 6px);
    font-size: 11px;
    padding: 10px 6px;
    text-align: center;
    letter-spacing: 0.04em;
    box-sizing: border-box;
  }

  .music-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .music-link-box {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .cta-button {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 14px 16px;
  }

  .player,
  audio.player {
    width: 100%;
    max-width: 100%;
  }

  .archive-frame,
  .photo-box,
  .experiment-card,
  .ig-card,
  .instructions {
    max-width: 100%;
  }

  .ig-thumb {
    max-height: 220px;
  }

  .ig-embed {
    min-height: 360px;
  }

  .symbols {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .status-banner {
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  h1 {
    font-size: 1.35rem;
  }

  h2 {
    font-size: 1.05rem;
  }

  body {
    font-size: 14px;
  }

  .site-footer {
    padding: 16px 12px;
  }
}

@media (max-width: 380px) {
  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav a:nth-child(4),
  .site-nav a:nth-child(5) {
    grid-column: auto;
  }

  .logo {
    max-width: 78vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
    opacity: 1;
  }

  a, .cta-button, .music-link-box, .symbol, .experiment-card {
    transition: none;
  }
}
