:root {
  --hi-blue: #1310e0;
  --hi-pink: #cc10e0;
  --hi-cyan: #10b3e0;
  --bg-1: #160b73;
  --bg-2: #31003b;
  --ink: #e9e6ff;
  --ink-muted: #a79fd6;
  --panel: rgba(22, 11, 115, 0.35);
  --border: rgba(16, 179, 224, 0.35);
  --font-display: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(204, 16, 224, 0.25), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(16, 179, 224, 0.2), transparent 50%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 100%);
  color: var(--ink);
  font-family: var(--font-mono);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- overlays ---------- */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 49;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(16, 179, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 179, 224, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
}

/* ---------- layout shells ---------- */

header, main, footer { position: relative; z-index: 1; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 5vw;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(19, 8, 60, 0.92);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px var(--hi-cyan);
}

.cursor {
  color: var(--hi-pink);
  animation: blink 1.1s steps(1) infinite;
}

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

.nav { display: flex; gap: 1.75rem; }

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  position: relative;
  transition: color 0.2s ease;
}

.nav a::before { content: "> "; opacity: 0; transition: opacity 0.2s ease; color: var(--hi-pink); }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
  .nav a:hover::before { opacity: 1; }
}

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

.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero-eyebrow {
  color: var(--hi-cyan);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.hero h1.glitch {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 7rem);
  margin: 0;
  color: var(--ink);
  text-shadow:
    0 0 12px var(--hi-blue),
    0 0 28px rgba(16, 179, 224, 0.5);
  position: relative;
  letter-spacing: 0.02em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: transparent;
}

.glitch::before {
  color: var(--hi-pink);
  animation: glitch-shift-1 6s infinite steps(1);
  clip-path: inset(0 0 92% 0);
}

.glitch::after {
  color: var(--hi-cyan);
  animation: glitch-shift-2 6s infinite steps(1);
  clip-path: inset(85% 0 0 0);
}

@keyframes glitch-shift-1 {
  0%, 92%, 100% { transform: translate(0, 0); opacity: 0; }
  93% { transform: translate(-3px, -1px); opacity: 0.8; }
  95% { transform: translate(3px, 1px); opacity: 0.8; }
  97% { transform: translate(-2px, 0); opacity: 0.6; }
}

@keyframes glitch-shift-2 {
  0%, 90%, 100% { transform: translate(0, 0); opacity: 0; }
  91% { transform: translate(3px, 1px); opacity: 0.8; }
  94% { transform: translate(-3px, 0); opacity: 0.8; }
  96% { transform: translate(2px, -1px); opacity: 0.6; }
}

.hero-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 1.25rem 0 0.25rem;
  color: var(--ink);
}

.accent-pink { color: var(--hi-pink); text-shadow: 0 0 10px rgba(204, 16, 224, 0.7); }
.accent-blue { color: var(--hi-cyan); text-shadow: 0 0 10px rgba(16, 179, 224, 0.6); }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.btn {
  font-family: var(--font-mono);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 2px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(90deg, var(--hi-blue), var(--hi-pink));
  color: #fff;
  box-shadow: 0 0 18px rgba(204, 16, 224, 0.35);
}

.btn-ghost {
  color: var(--hi-cyan);
  border-color: var(--hi-cyan);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 24px rgba(204, 16, 224, 0.6); }

  .btn-ghost:hover {
    background: rgba(16, 179, 224, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(16, 179, 224, 0.35);
  }
}

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

.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
  color: var(--ink);
}

.tag {
  color: var(--hi-pink);
  margin-right: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.panel {
  background: rgba(22, 11, 115, 0.55);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem;
}

.about-panel p { margin: 0; color: var(--ink); }

/* ---------- projects ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--hi-cyan);
    box-shadow: 0 0 20px rgba(16, 179, 224, 0.25);
  }
}

.placeholder-card { border-style: dashed; opacity: 0.75; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-head h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0;
  color: var(--ink);
}

.card-status {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.status-active { color: var(--hi-cyan); border: 1px solid var(--hi-cyan); }
.status-todo { color: var(--ink-muted); border: 1px dashed var(--ink-muted); }

.card p { color: var(--ink-muted); font-size: 0.9rem; margin: 0.5rem 0 1rem; }

.card-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.card-tags span {
  font-size: 0.7rem;
  color: var(--hi-pink);
  border: 1px solid rgba(204, 16, 224, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--hi-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

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

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

.contact-primary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--hi-cyan);
  text-decoration: none;
  margin: 0.75rem 0;
  text-shadow: 0 0 10px rgba(16, 179, 224, 0.5);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-primary:hover { border-color: var(--hi-cyan); }

.muted { color: var(--ink-muted); font-size: 0.9rem; margin: 0; }

.muted-link { color: var(--ink-muted); text-decoration: underline; text-underline-offset: 2px; }
.muted-link:hover { color: var(--ink); }

/* ---------- links ---------- */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .link-btn:hover {
    transform: translateX(4px);
    border-color: var(--hi-pink);
    box-shadow: 0 0 16px rgba(204, 16, 224, 0.3);
  }
}

.link-arrow { color: var(--hi-pink); }

/* ---------- standalone links page ---------- */

.links-page { position: relative; z-index: 1; }

.links-hero {
  min-height: 32vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 1rem;
}

.links-page-logo {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.links-section {
  max-width: 640px;
  padding-top: 1rem;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.back-link:hover { color: var(--hi-cyan); border-color: var(--hi-cyan); }

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

.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

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

@media (max-width: 640px) {
  .site-header {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }
  .nav { width: 100%; justify-content: space-between; gap: 0.5rem; }
  .nav a { font-size: 0.78rem; }
}
