/* TOKENS*/
:root {
  --bg:           #0b0b11;
  --surface:      #111118;
  --surface-2:    #17171f;
  --border:       #ffffff12;
  --border-hover: #ffffff1e;
  --text:         #e2e2ee;
  --muted:        #7272a0;
  --accent-unity: #4fc3f7;
  --accent-mc:    #f97316;
  --accent-ml:    #a78bfa;
  --accent-misc:  #60a5fa;
  --modrinth:     #1bd96a;
  --curseforge:   #f16436;
  --ongoing:      #fbbf24;
  --glow-unity:   rgba(79,195,247,.14);
  --glow-mc:      rgba(249,115,22,.14);
  --glow-ml:      rgba(167,139,250,.14);
  --glow-misc:    rgba(96,165,250,.14);
}

/* RESET & BASE*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* LAYOUT HELPERS */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
section { padding: 80px 0; }

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,11,17,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  color: #fff;
}
.nav-logo span { color: var(--accent-unity); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: .85rem;
  color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.art-link {
  color: var(--accent-ml);
  opacity: .85;
}
.nav-links a.art-link:hover { opacity: 1; }

/* HERO */
.hero {
  padding: 90px 0 80px;
  position: relative;
  z-index: 1;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero-avatar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  object-fit: cover;
}
.hero-avatar-label {
  font-size: .72rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .06em;
  text-align: center;
  line-height: 1.5;
}
.hero-content { flex: 1; }
.hero h1 { color: #fff; line-height: 1.08; margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--accent-unity); }
.hero-links { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: #fff;
  color: #0b0b11;
}
.btn-primary:hover { background: #e0e0f0; }

/* SECTION HEADER */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-ongoing {
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.25);
  color: var(--ongoing);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: .72rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* PROJECT CARDS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.projects-grid.single   { grid-template-columns: 1fr; }
.projects-grid.two-col  { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
}

/* Outline borders */
.card.unity  { border: 1px solid rgba(79,195,247,.18); }
.card.mc     { border: 1px solid rgba(249,115,22,.18); }
.card.ml     { border: 1px solid rgba(167,139,250,.18); }
.card.misc   { border: 1px solid rgba(96,165,250,.18); }

.card.unity:hover  { border-color: rgba(79,195,247,.35);  box-shadow: 0 8px 32px var(--glow-unity);  transform: translateY(-2px); }
.card.mc:hover     { border-color: rgba(249,115,22,.35);  box-shadow: 0 8px 32px var(--glow-mc);    transform: translateY(-2px); }
.card.ml:hover     { border-color: rgba(167,139,250,.35); box-shadow: 0 8px 32px var(--glow-ml);    transform: translateY(-2px); }
.card.misc:hover   { border-color: rgba(96,165,250,.35);  box-shadow: 0 8px 32px var(--glow-misc);  transform: translateY(-2px); }

/* Media slot */
.card-media {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.card-media img,
.card-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-media video { background: #000; }
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: var(--muted);
}
.media-placeholder svg { opacity: .35; }
.media-placeholder span {
  font-size: .78rem;
  font-family: 'JetBrains Mono', monospace;
  opacity: .4;
}

/* Card body */
.card-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.card-desc { font-size: .875rem; color: var(--muted); line-height: 1.6; }
.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}


.platform-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.platform-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: all .2s;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.platform-icon-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}
.platform-icon-btn.curseforge {
  background: rgba(241,100,54,.12);
  border-color: rgba(241,100,54,.28);
}
.platform-icon-btn.curseforge:hover {
  background: rgba(241,100,54,.22);
  border-color: rgba(241,100,54,.5);
}
.platform-icon-btn.modrinth {
  background: rgba(27,217,106,.1);
  border-color: rgba(27,217,106,.25);
}
.platform-icon-btn.modrinth:hover {
  background: rgba(27,217,106,.18);
  border-color: rgba(27,217,106,.45);
}

/* GITHUB BUTTON */
.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border-hover);
  color: var(--text);
  transition: all .2s;
}
.btn-github:hover {
  background: #ffffff10;
  border-color: #fff3;
}
.btn-github svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Downloads stat */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 9px;
}

/* MINECRAFT SECTION */
.mc-section { background: rgba(249,115,22,.025); }

/* TEMPLATE GUIDE */
.guide-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 0;
}
.guide-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
}
.guide-box pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  line-height: 1.7;
  color: #c0c0d8;
  overflow-x: auto;
  white-space: pre;
}
.guide-box .cm  { color: #4a4a6a; }
.guide-box .kw  { color: #7dd3fc; }
.guide-box .str { color: #86efac; }
.guide-box .val { color: #fbbf24; }
code {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
}

/* FOOTER */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .projects-grid.two-col { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .nav-links { display: none; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-avatar { flex-direction: row; gap: 14px; align-items: center; }
  .hero-avatar img { width: 72px; height: 72px; }
  .hero-avatar-label { text-align: left; }
}
