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

/* ===== VARIABLES ===== */
:root {
  --bg-primary: #0f1115;
  --bg-secondary: #121418;
  --bg-card: #16181f;
  --bg-card-hover: #1a1d24;
  --text-primary: #e8eaf0;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #57a6ff;
  --accent-glow: rgba(87, 166, 255, 0.15);
  --accent-glow-strong: rgba(87, 166, 255, 0.3);
  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(87, 166, 255, 0.4);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Roboto Mono", monospace;
}

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== ANIMATED GRID BACKGROUND ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(87, 166, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 166, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.hero {
  padding: 6rem 0 6rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.typewriter {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--accent);
  margin-bottom: 1.5rem;
  min-height: 1.8em;
}

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

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

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
}

.btn-primary:hover {
  background: #6cb3ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-icon {
  flex-shrink: 0;
  display: inline-block;
  width: 1rem;
  height: 1rem;
}

/* ===== ABOUT ===== */
.about {
  padding: 4rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
  gap: 3rem;
  align-items: center;
}

.about-text h2 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Code Block */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-block pre {
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.6;
}

.code-keyword { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-type { color: #82aaff; }
.code-var { color: #f07178; }
.code-string { color: #c3e88d; }
.code-comment { color: #676e95; font-style: italic; }
/* ===== INFO CARD ===== */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.info-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.info-card ul {
  list-style: none;
}
.info-card li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(148, 163, 184, 0.05);
}
.info-card li:last-child {
  border-bottom: none;
}
.info-card li span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== SECTIONS COMMON ===== */
.section-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* ===== PLUGINS ===== */
.plugins {
  padding: 4rem 0;
}

.plugins-grid {
  display: grid;
  gap: 1rem;
}

.plugin-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.plugin-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-hover);
}

.plugin-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.plugin-icon svg {
  width: 100%;
  height: 100%;
}

.plugin-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.plugin-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.plugin-meta {
  display: flex;
  gap: 0.5rem;
}

.plugin-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(87, 166, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(87, 166, 255, 0.2);
}

.plugin-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.plugin-card:hover .plugin-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ===== LINKS ===== */
.links {
  padding: 4rem 0 6rem;
}

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

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.link-card:hover:not(.link-card-disabled) {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-hover);
}

.link-card-disabled {
  cursor: default;
  opacity: 0.5;
}

.link-icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--accent);
  flex-shrink: 0;
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

.link-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.link-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.link-card:hover:not(.link-card-disabled) .link-info h3 {
  color: var(--accent);
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .typewriter {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .btn-primary {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
  }

  .btn-secondary {
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
  }

  .about {
    padding: 3rem 0;
  }

  .about-text h2 {
    font-size: 1.25rem;
  }

  .about-text p {
    font-size: 0.9rem;
  }

  .plugins {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .plugin-card {
    grid-template-columns: auto 1fr;
    padding: 1.25rem;
  }

  .plugin-arrow {
    display: none;
  }

  .links {
    padding: 3rem 0 4rem;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .typewriter {
    font-size: 0.9rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }

  .hero-actions {
    padding: 0 0.5rem;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .about-content {
    max-width: 100%;
  }

  .about-text h2 {
    font-size: 1.1rem;
  }

  .about-text p {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .plugin-card {
    padding: 1rem;
    gap: 1rem;
  }

  .plugin-icon {
    width: 2rem;
    height: 2rem;
  }

  .plugin-info h3 {
    font-size: 1rem;
  }

  .plugin-info p {
    font-size: 0.8rem;
  }

  .link-card {
    padding: 1rem;
  }

  .link-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .link-info h3 {
    font-size: 0.9rem;
  }

  .link-info p {
    font-size: 0.75rem;
  }

  .site-footer {
    padding: 1.5rem 0;
  }

  .site-footer p {
    font-size: 0.7rem;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor {
    animation: none;
    opacity: 0;
  }
}

/* ===== CONTACT ===== */
.contact {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.contact-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer-license {
  margin-top: 0.5rem;
  font-size: 0.7rem;
}

.footer-license a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-license a:hover {
  color: #6cb3ff;
}

/* ===== RESPONSIVE: CONTACT ===== */
@media (max-width: 768px) {
  .contact {
    padding: 3rem 0;
  }
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
}
