:root {
  --bg: #0a0a0f;
  --bg-alt: #111118;
  --pink: #ff2f6e;
  --yellow: #f7ff2e;
  --cyan: #2ef7ff;
  --text: #e8e6f0;
  --text-dim: #8a8896;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ---------- ambient texture ---------- */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%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");
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- topbar ---------- */

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.logo .dot { color: var(--pink); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.discord-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
}

.discord-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  object-fit: cover;
}

.discord-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.discord-text {
  transition: color 0.15s ease;
}

.discord-badge:hover .discord-text {
  color: var(--cyan);
}

.discord-badge:hover .discord-avatar {
  outline: 1px solid var(--cyan);
}

.discord-dot.status-online { background: #23a55a; box-shadow: 0 0 6px #23a55a; }
.discord-dot.status-idle { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.discord-dot.status-dnd { background: var(--pink); box-shadow: 0 0 6px var(--pink); }
.discord-dot.status-offline { background: var(--text-dim); box-shadow: none; }

@media (max-width: 700px) {
  .topbar-right { gap: 1rem; }
  .discord-text { display: none; }
}

.topbar-links {
  display: flex;
  gap: 2rem;
}

.topbar-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-links a:hover {
  color: var(--cyan);
}

@media (max-width: 600px) {
  .topbar-links { gap: 1.1rem; }
}

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

.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  padding: 2rem 2.5rem;
  background:
    linear-gradient(160deg, transparent 60%, rgba(255,47,110,0.08) 100%),
    var(--bg);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}

.hero-frame { max-width: 900px; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--pink);
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.glitch {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  position: relative;
  color: var(--text);
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-1 4.5s infinite linear;
  clip-path: inset(0 0 55% 0);
}

.glitch::after {
  color: var(--pink);
  animation: glitch-2 4.5s infinite linear;
  clip-path: inset(60% 0 0 0);
}

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

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

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 480px;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.9rem 1.75rem;
  border: 1px solid var(--text);
  color: var(--text);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 92% 100%, 0 100%);
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--pink);
  border-color: var(--pink);
  color: #0a0a0f;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
}

.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
}

.hero-tag {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.hero-tag-1 { top: 2rem; right: 2.5rem; color: var(--yellow); }
.hero-tag-2 { bottom: 3.5rem; right: 2.5rem; }

/* ---------- marquee ---------- */

.marquee {
  background: var(--pink);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.65rem 0;
  border-top: 1px solid var(--bg);
  border-bottom: 1px solid var(--bg);
}

.marquee-track {
  display: inline-flex;
  animation: scroll-left 18s linear infinite;
}

.marquee-track span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding-right: 0;
}

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

/* ---------- about ---------- */

.section-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--pink);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.about {
  padding: 5rem 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.about-inner {
  max-width: 720px;
}

.about-text {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--text);
}

/* ---------- skills ---------- */

.skills {
  padding: 4rem 2.5rem 5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.section-label-pad { margin-bottom: 2rem; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.6rem 1rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.skill-tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- panels ---------- */

.panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
  margin: 1px 0;
}

.panel {
  background: var(--bg-alt);
  padding: 3rem 2rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  transition: background 0.2s ease;
}

.panel:hover { background: #16161f; }

.panel-num {
  position: absolute;
  top: 1.75rem;
  left: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.panel h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.panel-pink h2 { color: var(--pink); }
.panel-cyan h2 { color: var(--cyan); }
.panel-yellow h2 { color: var(--yellow); }

.panel p {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 32ch;
  margin-bottom: 1.25rem;
}

.panel-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text);
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.panel-link:hover {
  border-color: currentColor;
}

@media (max-width: 800px) {
  .panels { grid-template-columns: 1fr; }
}

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

.footer {
  padding: 5rem 2.5rem 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 0.95;
  margin-bottom: 2rem;
}

.cursor {
  color: var(--pink);
  animation: blink 1s step-end infinite;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  max-width: 480px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.footer-link:hover {
  color: var(--cyan);
  padding-left: 0.5rem;
}

.footer-link-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.footer-link-arrow {
  font-family: 'JetBrains Mono', monospace;
}

.footer-meta {
  margin-top: 2.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}