:root {
  --bg: #020a03;
  --bg-deep: #000000;
  --terminal: #0f1d10cc;
  --line: #1f4222;
  --text: #95ffa4;
  --glow: #39ff6f;
  --muted: #64b36f;
  --warn: #d5ff75;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Share Tech Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, #143117 0%, transparent 25%),
    radial-gradient(circle at 80% 90%, #102513 0%, transparent 30%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-deep) 100%);
  overflow-x: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='6' fill='%23010302' fill-opacity='0'/%3E%3Cpath d='M8 9h16v10l-8 5-8-5z' fill='%2339ff6f' fill-opacity='0.95'/%3E%3Cpath d='M10 12h12v5l-6 4-6-4z' fill='%23010802' fill-opacity='0.95'/%3E%3Cpath d='M12 14h2v2h-2zm6 0h2v2h-2z' fill='%2339ff6f'/%3E%3Cpath d='M11 22l5 4 5-4' fill='none' stroke='%2339ff6f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 3 3, auto;
}

a,
button,
[role="button"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 9h16v10l-8 5-8-5z' fill='%2339ff6f'/%3E%3Cpath d='M10 12h12v5l-6 4-6-4z' fill='%23010302'/%3E%3C/svg%3E") 3 3, pointer;
}

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 20%, #14311788 0%, transparent 55%),
    #010302;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.boot-panel {
  width: min(640px, 92vw);
  border: 1px solid #2b6b32;
  background: #071509ed;
  box-shadow: 0 0 30px #39ff6f33;
  padding: 1rem;
}

.boot-title {
  margin: 0 0 0.6rem;
  color: var(--warn);
  letter-spacing: 0.08em;
}

.boot-message {
  margin: 0 0 0.6rem;
  font-family: "VT323", monospace;
  font-size: clamp(1.4rem, 4vw, 2rem);
  text-shadow: 0 0 10px #39ff6f66;
}

.boot-progress-wrap {
  width: 100%;
  border: 1px solid #2b6b32;
  background: #041006;
  height: 16px;
}

.boot-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #39ff6f 0%, #a6ff72 100%);
  box-shadow: 0 0 12px #39ff6f99;
  transition: width 0.18s linear;
}

.boot-percent {
  margin: 0.55rem 0 0;
  text-align: right;
  color: var(--muted);
}

body.loaded .boot-loader {
  opacity: 0;
  visibility: hidden;
}

#matrix-rain {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.45;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(177, 255, 169, 0.07) 0,
    rgba(177, 255, 169, 0.07) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: screen;
  animation: scanShift 8s linear infinite;
}

.hero {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

.typing-banner {
  width: min(100%, 600px);
  margin: 0 auto 0.9rem;
  display: block;
  filter: saturate(1.15) drop-shadow(0 0 10px #72ff8d55);
}

.boot-line {
  color: var(--warn);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  animation: blink 1.4s steps(2, start) infinite;
}

.glitch {
  position: relative;
  margin: 0;
  font-family: "VT323", monospace;
  font-size: clamp(2.6rem, 9vw, 6rem);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 8px var(--glow), 0 0 24px var(--glow);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}

.glitch::before {
  color: #73ffe3;
  transform: translate(-2px, 0);
  animation: glitchA 2.5s infinite linear alternate-reverse;
}

.glitch::after {
  color: #d7ff8a;
  transform: translate(2px, 0);
  animation: glitchB 2.2s infinite linear alternate-reverse;
}

.tagline {
  margin: 0.8rem auto 1.1rem;
  max-width: 65ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.social-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.social-row a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
  background: #0d1f10b5;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-row a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px #39ff6f66;
}

.icon-row a {
  padding: 0.45rem;
}

.icon-row img {
  width: 40px;
  height: 40px;
  display: block;
}

.terminal-shell {
  width: min(960px, 95vw);
  margin: 0 auto 2.5rem;
  border: 1px solid var(--line);
  background: var(--terminal);
  box-shadow: 0 0 0 1px #16331c, 0 0 34px #0d2a1488;
  backdrop-filter: blur(3px);
}

.terminal-block {
  border-bottom: 1px dashed #2b6b32;
  padding: 1.3rem 1rem;
  animation: fadeUp 0.7s ease both;
}

.terminal-block:last-child {
  border-bottom: none;
}

h2,
h3 {
  margin-top: 0;
}

h2 {
  color: var(--warn);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.stats-grid article {
  border: 1px solid #2b6b32;
  padding: 0.75rem;
  background: #071509cc;
}

.label {
  color: var(--muted);
  display: block;
  margin-bottom: 0.3rem;
}

.value {
  font-size: 1.2rem;
  color: var(--text);
}

.metrics-badge {
  margin: 1rem 0 0;
}

.support-img {
  max-width: 220px;
  width: 100%;
  height: auto;
}

.stack-img,
.terminal-img {
  max-width: 100%;
  height: auto;
  border: 1px solid #2b6b32;
  background: #08170ad9;
  padding: 0.25rem;
}

.stack-img {
  margin: 0.35rem 0 1rem;
}

.stats-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

ul {
  padding-left: 1.2rem;
  margin: 0;
}

li {
  margin-bottom: 0.4rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.project-card {
  border: 1px solid #2b6b32;
  background: #08170ad9;
  padding: 0.8rem;
}

.project-card .meta {
  color: var(--muted);
  margin: 0.5rem 0;
}

.project-card a {
  color: var(--warn);
  text-decoration: none;
}

.footer {
  text-align: center;
  color: #7ec785;
  padding: 1rem 1rem 2rem;
  font-size: 0.95rem;
}

.email-list {
  word-break: break-word;
  line-height: 1.6;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

@keyframes scanShift {
  0% {
    background-position-y: 0;
  }
  100% {
    background-position-y: 12px;
  }
}

@keyframes glitchA {
  0%,
  100% {
    clip-path: inset(5% 0 60% 0);
  }
  35% {
    clip-path: inset(65% 0 5% 0);
  }
  70% {
    clip-path: inset(30% 0 30% 0);
  }
}

@keyframes glitchB {
  0%,
  100% {
    clip-path: inset(70% 0 5% 0);
  }
  30% {
    clip-path: inset(18% 0 54% 0);
  }
  65% {
    clip-path: inset(42% 0 18% 0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .project-grid,
  .stats-grid,
  .stats-images {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.8rem;
  }

  .tagline {
    font-size: 1rem;
  }
}
