:root {
  --bg: #070708;
  --bg-elevated: #0e0e12;
  --text: #e8e8ec;
  --text-dim: #8b8b9a;
  --accent: #3dff9a;
  --accent-dim: rgba(61, 255, 154, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --font-sans: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: -0.02em;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(12px);
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo-cursor {
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text) !important;
  background: var(--bg-elevated);
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: calc(100svh - 56px);
  margin-top: 56px;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) 1.5rem 4rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.matrix-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  background: #070708;
}

.hero-matrix-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 75% 65% at 50% 28%, rgba(7, 7, 8, 0.15) 0%, rgba(7, 7, 8, 0.55) 45%, rgba(7, 7, 8, 0.88) 100%),
    linear-gradient(180deg, transparent 0%, rgba(7, 7, 8, 0.25) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  animation: hero-in 1s var(--ease-out) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
}

.prompt {
  color: var(--accent);
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 6.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.title-line {
  display: block;
}

.title-line.accent {
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 36ch;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.2s var(--ease-out), border-color 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #041208;
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

.terminal {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  animation: terminal-up 0.85s var(--ease-out) 0.15s both;
}

@keyframes terminal-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}
.terminal-bar .dot:nth-child(2) {
  background: #febc2e;
}
.terminal-bar .dot:nth-child(3) {
  background: #28c840;
}

.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.terminal-body {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.terminal-body .ok {
  color: var(--accent);
}

.terminal-body .key {
  color: var(--text);
}

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

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 920px;
  margin: 0 auto 2.5rem;
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.stack-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem 2.5rem;
  max-width: 920px;
  margin: 0 auto;
}

.stack-block .label {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.tag-list li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s;
}

.tag-list li:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto 2.5rem;
}

@media (min-width: 640px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.stat-value {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
}

.stat-value.plus-shown::after {
  content: "+";
  font-size: 0.55em;
  color: var(--accent);
  margin-left: 0.05em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.lang-bar {
  display: flex;
  max-width: 920px;
  margin: 0 auto;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.lang-seg {
  flex: 0 0 var(--w);
  background: var(--c);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.lang-seg span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #0a0a0b;
  font-weight: 600;
  padding: 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .lang-seg span {
    font-size: 0;
  }
}

.repo-list {
  list-style: decimal-leading-zero;
  margin: 0 auto 1.5rem;
  padding-left: 2.5rem;
  max-width: 920px;
  color: var(--text-dim);
}

.repo-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.repo-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0.5rem 0;
  margin: -0.5rem 0;
  transition: color 0.2s, transform 0.2s var(--ease-out);
}

.repo-link:hover {
  color: var(--text);
  transform: translateX(4px);
}

.repo-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
}

.repo-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.inline-link {
  display: inline-block;
  margin-left: 2.5rem;
  max-width: 920px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8125rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.recent-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem 1.25rem;
}

.recent-grid a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  display: block;
  transition: color 0.2s, border-color 0.2s;
}

.recent-grid a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.site-footer {
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.site-footer p {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
