/* ============================================================
   ERIKRAFT — DESIGN
   Dark · Neon Beige · Mono · Clean
   ============================================================ */

@font-face {
  font-family: "Monocraft";
  src: url("font/Monocraft.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0a090b;
  --bg2: #111013;
  --bg3: #19161b;
  --panel: rgba(17, 16, 19, 0.9);
  --border: #2a2430;
  --accent: #867d6c;
  --accent-2: #6f6657;
  --accent-soft: rgba(134, 125, 108, 0.18);
  --accent-dim: rgba(134, 125, 108, 0.08);
  --text: #f0eaf4;
  --muted: #b8b0bc;
  --mono: "Space Mono", "Monocraft", monospace;
  --sans: "DM Sans", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  --transition: 0.25s ease;
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
  background-image:
    linear-gradient(var(--accent-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-dim) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

body.menu-open {
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-2);
  border-radius: 3px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--text);
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

p {
  color: var(--muted);
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section-stack {
  display: grid;
  gap: 2rem;
}

.section-heading {
  max-width: 780px;
}

.section-heading h1,
.section-heading h2,
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.eyebrow,
.section-label,
.page-hero-label,
.year-label,
.timeline-badge,
.preview-chip,
.preview-tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow,
.section-label,
.page-hero-label,
.year-label {
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(134, 125, 108, 0.24);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  width: fit-content;
}

.hero-title span,
.section-line,
.timeline-item.is-featured .timeline-dot {
  color: var(--accent);
}

.section-line {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  gap: 1rem;
  background: rgba(10, 9, 11, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.site-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-core {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  border: 1px solid rgba(134, 125, 108, 0.25);
  background: linear-gradient(135deg, var(--accent-dim), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 34px var(--accent-soft);
  animation: pulse 1.6s infinite ease-in-out;
}

.site-loader p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.background-effects {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.36;
}

.orb-a {
  top: -8%;
  left: -8%;
  width: 24rem;
  height: 24rem;
  background: rgba(134, 125, 108, 0.22);
  animation: drift 14s ease-in-out infinite;
}

.orb-b {
  right: -10%;
  top: 14%;
  width: 28rem;
  height: 28rem;
  background: rgba(130, 116, 89, 0.16);
  animation: drift 18s ease-in-out infinite reverse;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 72%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 9, 11, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
}

.brand img {
  width: 230px;
  height: 73px;
  object-fit: contain;
}

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

.site-nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg3);
}

.nav-cta {
  border: 1px solid rgba(134, 125, 108, 0.24);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hero-grid,
.page-hero-shell {
  display: grid;
  align-items: center;
  gap: 2rem;
}

.hero-grid {
  grid-template-columns: 1.08fr 0.92fr;
  min-height: calc(100vh - 72px);
}

.page-home .hero-grid {
  grid-template-columns: 1fr;
}

.hero-copy,
.hero-visual,
.info-card,
.social-card,
.project-feature,
.showcase-card,
.timeline-item,
.timeline-card {
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition),
    opacity var(--transition);
}

.hero-desc,
.hero-support,
.section-heading p {
  max-width: 670px;
}

.hero-actions,
.project-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #12100e;
  box-shadow: 0 14px 28px var(--accent-soft);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-2);
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.hero-stats li,
.info-card,
.social-card,
.project-feature,
.showcase-card,
.hero-card-main,
.showcase-preview,
.timeline-card {
  background: linear-gradient(180deg, rgba(25, 22, 27, 0.96), rgba(17, 16, 19, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-stats li {
  padding: 1rem;
}

.hero-stats strong {
  display: block;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.6rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.hero-card-main {
  position: absolute;
  inset: 2rem 0 3rem 2rem;
  padding: 1.5rem;
  overflow: hidden;
}

.hero-card-main::before,
.project-preview::before,
.showcase-preview::before,
.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent 42%);
  pointer-events: none;
}

.hero-card-top {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-pill,
.preview-tag,
.preview-chip,
.timeline-badge {
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(134, 125, 108, 0.22);
  background: var(--accent-dim);
  color: var(--accent);
}

.status-pill.alt {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-display {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding-top: 1.5rem;
}

.pixel-frame {
  position: relative;
  width: min(100%, 360px);
  min-height: 360px;
  padding: 1rem;
  border-radius: 32px;
  border: 1px solid rgba(134, 125, 108, 0.18);
  background: linear-gradient(180deg, rgba(10, 9, 11, 0.96), rgba(17, 16, 19, 0.98));
}

.pixel-glow {
  position: absolute;
  inset: 1rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(134, 125, 108, 0.18), transparent 54%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 8px);
}

.pixel-content {
  position: relative;
  z-index: 1;
  min-height: 320px;
  display: grid;
  place-items: center;
  gap: 1rem;
  text-align: center;
}

.pixel-content i {
  font-size: 3.8rem;
  color: var(--accent);
}

.pixel-content p {
  max-width: 260px;
  margin: 0;
}

.floating-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(17, 16, 19, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
}

.badge-a {
  top: 1rem;
  right: 0;
}

.badge-b {
  bottom: 6.5rem;
  left: 0;
}

.badge-c {
  right: 1rem;
  bottom: 0;
}

.about-grid,
.featured-grid,
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

.about-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.info-card {
  padding: 1.5rem;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 1rem;
}

.info-card:hover,
.social-card:hover,
.project-feature:hover,
.showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

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

.social-card {
  display: grid;
  place-items: center;
  min-height: 84px;
  aspect-ratio: 1;
  padding: 1rem;
}

.social-card i {
  font-size: 1.8rem;
  color: var(--accent);
}

.featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-preview,
.showcase-preview {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  min-height: 250px;
}

.project-preview-drop,
.preview-drop-large {
  background:
    radial-gradient(circle at top, rgba(134, 125, 108, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(25, 22, 27, 0.96), rgba(17, 16, 19, 0.96));
}

.project-preview-search,
.preview-search-large {
  background:
    radial-gradient(circle at top right, rgba(134, 125, 108, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(25, 22, 27, 0.96), rgba(17, 16, 19, 0.96));
}

.preview-window {
  display: flex;
  gap: 0.5rem;
}

.preview-window div {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.preview-searchbar {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.1rem;
  margin: 2rem 0 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.project-content,
.showcase-content {
  padding: 1.5rem;
}

.showcase-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
}

.showcase-preview {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.page-hero {
  padding: 88px 0 54px;
  text-align: center;
  position: relative;
}

.page-hero .section-heading,
.page-hero p {
  margin-inline: auto;
}

.timeline-wrap {
  padding: 0 0 96px;
}

.timeline-year-group {
  margin-bottom: 3.2rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 7px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateX(-14px);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-dot {
  position: absolute;
  top: 14px;
  left: -26px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  z-index: 1;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.timeline-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.5rem;
}

.timeline-item:hover .timeline-card {
  transform: translateX(4px);
  border-color: var(--accent);
}

.timeline-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.timeline-item:hover .timeline-card::after,
.timeline-item.is-featured .timeline-card::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.timeline-date {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
}

.timeline-badge.badge-site,
.timeline-badge.badge-website {
  color: var(--accent);
}

.timeline-badge.badge-youtube {
  color: #ff4c4c;
  border-color: rgba(255, 76, 76, 0.25);
  background: rgba(255, 76, 76, 0.08);
}

.timeline-badge.badge-discord {
  color: #8ea1ff;
  border-color: rgba(142, 161, 255, 0.25);
  background: rgba(142, 161, 255, 0.08);
}

.timeline-badge.badge-site,
.timeline-badge.badge-website {
  border-color: rgba(134, 125, 108, 0.22);
  background: var(--accent-dim);
}

.timeline-badge.badge-inicio {
  color: #73d4ff;
  border-color: rgba(115, 212, 255, 0.25);
  background: rgba(115, 212, 255, 0.08);
}

.timeline-note {
  margin-top: 2.2rem;
}

.timeline-card.is-muted {
  background: transparent;
  border-style: dashed;
}

.timeline-card.is-muted h3,
.timeline-card.is-muted p {
  color: var(--muted);
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  background: rgba(17, 16, 19, 0.82);
}

.footer-shell,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.footer-brand {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.15rem;
}

.footer-copy {
  margin: 0.4rem 0 0;
  max-width: 420px;
}

.footer-bottom {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 24px var(--accent-soft);
  }
  50% {
    transform: scale(1);
    box-shadow: 0 0 44px rgba(134, 125, 108, 0.26);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(20px, -18px, 0);
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .about-grid,
  .featured-grid,
  .showcase-card {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: unset;
  }

  .hero-card-main {
    inset: 1rem 0 3rem;
  }

  .hero-visual {
    min-height: 480px;
  }

  .floating-badge {
    position: static;
    margin-top: 1rem;
    width: fit-content;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 1rem;
    right: 1rem;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(17, 16, 19, 0.98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a,
  .button {
    width: 100%;
  }

  .hero-stats,
  .footer-shell,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .container {
    width: min(calc(100% - 1.2rem), var(--container));
  }

  .hero-visual {
    min-height: 400px;
  }

  .pixel-frame {
    min-height: 300px;
  }

  .pixel-content {
    min-height: 260px;
  }

  .social-grid {
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 0.65rem;
  }

  .social-card {
    min-height: 64px;
    padding: 0.7rem;
  }

  .social-card i {
    font-size: 1.35rem;
  }

  .social-card,
  .info-card,
  .project-preview,
  .project-content,
  .showcase-preview,
  .showcase-content,
  .timeline-card {
    padding: 1.15rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .timeline-item {
    opacity: 1;
    transform: none;
  }
}

/* 404 -------------------------------------------------------- */
.page-404 {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.not-found-wrapper {
  width: min(100%, 720px);
}

.not-found-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.not-found-card h1 {
  margin: 1rem 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.not-found-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
