/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── VARIABLES ── */
:root {
  --bg:       #050508;
  --bg-2:     #0c0c14;
  --bg-card:  #0f0f1a;
  --cyan:     #00ffcc;
  --magenta:  #ff2d78;
  --amber:    #ffaa00;
  --green:    #39ff14;
  --white:    #dde8e4;
  --dim:      #4a5568;
  --border:   #1a1a2e;
  --font-mono: 'Share Tech Mono', monospace;
  --font-vt:   'VT323', monospace;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCANLINES ── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

/* ── NAV ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-vt);
  font-size: 1.6rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px var(--cyan);
}

.logo-bracket { color: var(--magenta); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}

/* ── HERO ── */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--dim);
}

/* GLITCH TITLE */
.hero-title {
  font-family: var(--font-vt);
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1.0;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  position: relative;
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
}

.hero-title::before {
  color: var(--cyan);
  animation: glitch-before 4s infinite;
  clip-path: inset(0 0 100% 0);
  text-shadow: -2px 0 var(--cyan);
}

.hero-title::after {
  color: var(--magenta);
  animation: glitch-after 4s infinite;
  clip-path: inset(100% 0 0 0);
  text-shadow: 2px 0 var(--magenta);
}

@keyframes glitch-before {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  91%  { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
  93%  { clip-path: inset(55% 0 25% 0); transform: translate(3px, 0); }
  95%  { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 0); }
  97%  { clip-path: inset(70% 0 10% 0); transform: translate(2px, 0); }
}

@keyframes glitch-after {
  0%, 90%, 100% { clip-path: inset(100% 0 0 0); transform: translate(0); }
  91%  { clip-path: inset(60% 0 20% 0); transform: translate(3px, 0); }
  93%  { clip-path: inset(25% 0 55% 0); transform: translate(-3px, 0); }
  95%  { clip-path: inset(80% 0 10% 0); transform: translate(2px, 0); }
  97%  { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 0); }
}

.hero-sub {
  font-size: 1rem;
  color: var(--dim);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* TICKER */
.hero-ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  white-space: nowrap;
}

.hero-ticker span {
  display: inline-block;
  animation: ticker 20s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--cyan);
  color: var(--bg);
  text-decoration: none;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: box-shadow 0.2s, opacity 0.2s;
}

.btn:hover {
  box-shadow: 0 0 20px var(--cyan);
  opacity: 0.9;
}

.btn-ghost {
  display: inline-block;
  border: 1px solid var(--dim);
  color: var(--dim);
  text-decoration: none;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  transition: color 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ── SECTION SHARED ── */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-num {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--dim);
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text h2 {
  font-family: var(--font-vt);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--dim);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.about-specs {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
}

.spec-block {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.3rem;
}

.spec-block:last-child { border-bottom: none; }

.spec-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.spec-value {
  font-size: 0.85rem;
  color: var(--white);
}

/* ── CRAFTS ── */
.crafts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}

.craft-card {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: none;
  transition: background 0.2s;
}

.craft-card:last-child { border-right: none; }

.craft-card:hover { background: var(--bg-card); }

.craft-icon {
  font-family: var(--font-vt);
  font-size: 1.8rem;
  color: var(--magenta);
  margin-bottom: 1rem;
  text-shadow: 0 0 8px var(--magenta);
}

.craft-card h3 {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.craft-card p {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.7;
}

/* ── COLLECTIVE ── */
.entities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.entity-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  transition: border-color 0.2s;
}

.entity-card:hover { border-color: var(--cyan); }

.entity-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--bg);
  background: var(--cyan);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-bottom: 1rem;
}

.entity-card h3 {
  font-family: var(--font-vt);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.entity-tagline {
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.entity-desc {
  font-size: 0.8rem;
  color: var(--dim);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.entity-status {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.status-active { color: var(--green); }
.status-wip    { color: var(--amber); }

/* ── WORKSHOPS ── */
.coming-soon-block {
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.cs-screen {
  padding: 3rem 2.5rem;
  font-family: var(--font-mono);
}

.cs-cursor {
  font-family: var(--font-vt);
  font-size: 2rem;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  margin-bottom: 1.5rem;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.cs-line {
  font-size: 0.85rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.cs-dim { color: var(--dim); }

.blink {
  animation: blink-cursor 1s step-end infinite;
}

.link-cyan {
  color: var(--cyan);
  text-decoration: none;
}

.link-cyan:hover { text-shadow: 0 0 6px var(--cyan); }

/* ── CONTACT ── */
.contact-inner h2 {
  font-family: var(--font-vt);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.text-cyan { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }

.contact-inner > p {
  color: var(--dim);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.socials a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.socials a:hover { color: var(--white); }

/* ── FOOTER ── */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-logo {
  font-family: var(--font-vt);
  font-size: 1.2rem;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}

.footer-copy {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.footer-kofi {
  font-size: 0.7rem;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-kofi:hover { color: var(--amber); }

/* ── CRT MODAL ── */
.crt-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.crt-overlay.active {
  display: flex;
}

/* Monitor shell */
.crt-monitor {
  width: 100%;
  max-width: 600px;
  background: #18181f;
  border-radius: 12px 12px 4px 4px;
  border: 2px solid #2a2a3a;
  box-shadow:
    0 0 0 4px #111118,
    0 0 40px rgba(0, 255, 204, 0.12),
    0 30px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

/* Bezel top bar */
.crt-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #2a2a3a;
}

.crt-title {
  font-family: var(--font-vt);
  font-size: 1rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.crt-close {
  background: none;
  border: 1px solid #2a2a3a;
  color: var(--dim);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s;
}

.crt-close:hover {
  color: var(--magenta);
  border-color: var(--magenta);
}

/* The screen */
.crt-screen {
  position: relative;
  background: #030808;
  margin: 1rem;
  border-radius: 6px;
  border: 2px solid #0a1a0f;
  box-shadow:
    inset 0 0 30px rgba(0, 255, 100, 0.04),
    inset 0 0 80px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(0, 255, 100, 0.05);
  overflow: hidden;
  max-height: 70vh;
}

/* Scanline overlay inside screen */
.crt-scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );
}

.crt-screen-inner {
  position: relative;
  z-index: 3;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 70vh;
}

/* Scrollbar styling for screen */
.crt-screen-inner::-webkit-scrollbar { width: 4px; }
.crt-screen-inner::-webkit-scrollbar-track { background: transparent; }
.crt-screen-inner::-webkit-scrollbar-thumb { background: #0f2a1a; }

/* System text lines */
.crt-sys {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  opacity: 0.9;
}

.crt-dim { color: #3a4a3a !important; }
.crt-success { color: var(--green) !important; text-shadow: 0 0 8px var(--green); }

.crt-rule {
  border: none;
  border-top: 1px solid #0f1f0f;
  margin: 1rem 0 1.25rem;
}

/* Honeypot — visually hidden but present */
.crt-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Form fields */
.crt-field {
  margin-bottom: 1rem;
}

.crt-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-bottom: 0.35rem;
}

.crt-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #1a3a1a;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  outline: none;
  transition: border-color 0.2s;
  caret-color: var(--cyan);
}

.crt-input:focus {
  border-bottom-color: var(--cyan);
}

.crt-input::placeholder {
  color: #1a3a2a;
}

.crt-select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2300ffcc'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  padding-right: 1.5rem;
}

.crt-select option {
  background: #050a05;
  color: var(--cyan);
}

.crt-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.crt-submit {
  display: inline-block;
  margin-top: 1.25rem;
  background: none;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}

.crt-submit:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 16px var(--cyan);
}

/* Monitor base / stand */
.crt-base {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crt-neck {
  width: 60px;
  height: 10px;
  background: #111118;
  border-left: 2px solid #2a2a3a;
  border-right: 2px solid #2a2a3a;
}

.crt-foot {
  width: 160px;
  height: 10px;
  background: #111118;
  border: 2px solid #2a2a3a;
  border-radius: 0 0 6px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
}

.crt-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 4px var(--green);
  animation: led-pulse 3s ease-in-out infinite;
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.crt-brand {
  font-family: var(--font-vt);
  font-size: 0.5rem;
  color: #2a2a3a;
  letter-spacing: 0.1em;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid      { grid-template-columns: 1fr; gap: 2.5rem; }
  .crafts-grid     { grid-template-columns: repeat(2, 1fr); }
  .craft-card      { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .craft-card:nth-child(3n) { border-right: 1px solid var(--border); }
  .craft-card:nth-child(2n) { border-right: none; }
  .entities-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  nav { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; }
  .crafts-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; }
}
