html {
  scroll-behavior: smooth;
}
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg:         #0e1612; 
  --bg-2:       #16251c;
  --bg-card:    #1b2e23; 
  --bg-card-2:  #243d2e;
  
  --border:     rgba(52, 211, 120, 0.2);
  --border-md:  rgba(52, 211, 120, 0.4);
  
  --green-dim:  #258a56;
  --green:      #3ee686;
  --green-hi:   #52ff9a; 
  
  --text:       #f0fcf5; 
  --text-2:     #a8cfb9; 
  --text-3:     #6a917a;
  
  --font-d:     'Syne', sans-serif;
  --font-m:     'DM Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-d);
  overflow-x: hidden;
}

.mono { font-family: var(--font-m); }

.cursor-glow {
  position: fixed;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 255, 154, 0.15) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.04) 2px, rgba(0,0,0,0.04) 4px);
  pointer-events: none;
  z-index: 1000;
}

/* --- NAVBAR --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(14, 22, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-md);
  transition: all 0.4s ease;
}

.nav-links { 
  list-style: none; 
  display: flex; 
  gap: 36px; 
}

.nav-link { 
  text-decoration: none; 
  color: var(--text-2); 
  font-size: 13px; 
  font-weight: 600; 
  text-transform: uppercase;
  font-family: var(--font-m);
  letter-spacing: 1px;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--green-hi);
  text-shadow: 0 0 10px rgba(82, 255, 154, 0.5);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-hi);
  box-shadow: 0 0 10px var(--green-hi);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-logo a {
  text-decoration: none;
  color: var(--green-hi);
  font-weight: 800;
  transition: all 0.3s ease;
}

.nav-logo a:hover {
  text-shadow: 0 0 15px var(--green-hi);
  letter-spacing: 2px;
}

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding-top: 30vh;
}

.hero-video { 
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  opacity: 0.8; 
  z-index: 0; 
}

.hero-vignette { 
  position: absolute; 
  inset: 0; 
  background: radial-gradient(ellipse at center, transparent 10%, var(--bg) 95%); 
  z-index: 1; 
}

.hero-grid-overlay { 
  position: absolute; 
  inset: 0; 
  background-image: linear-gradient(rgba(52,211,120,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(52,211,120,0.04) 1px, transparent 1px); 
  background-size: 60px 60px; 
  z-index: 1; 
}

.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.profile-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(var(--green-hi) 0deg, var(--green-dim) 180deg, transparent 360deg);
  animation: spinRing 8s linear infinite;
}

@keyframes spinRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.profile-img { 
  width: 100%; 
  height: 100%; 
  border-radius: 50%; 
  background: var(--bg-card); 
  border: 3px solid var(--bg);
  background-image: url('/icon.png');
  background-size: cover;
  background-position: center;
}

.hero-footer {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-name {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
  color: var(--text);
}

.hero-subtitle { font-size: 14px; color: var(--green-hi); letter-spacing: 0.2em; text-transform: uppercase; }

/* ── SCROLL DOWN ARROW ── */
.scroll-down {
  display: block;
  width: max-content;
  margin: 30px auto 0;
  text-decoration: none;
  z-index: 3;
}

.scroll-icon {
  width: 48px;
  height: 48px;
  display: block;
  animation: arrowBounce 1.8s ease-in-out infinite;
  opacity: 0.6;
  transition: opacity 0.3s;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ── PROJECTS SECTION ── */
.projects { 
  padding: 72px 48px; 
  position: relative; 
  z-index: 2; 
}

.projects-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 32px; 
  max-width: 880px; 
  margin: 0 auto; 
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block; 
  width: 100%;
  max-width: 680px;  
  margin: 0 auto 32px; 
}

/* Base card layout */
.featured-card, .project-card { 
  width: 100%;       
  border: 1px solid var(--border); 
  border-radius: 16px; 
  background: var(--bg-card); 
  overflow: hidden; 
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
}

/* Container for the image to ensure it stays "under" the top edge */
.featured-thumb, .card-thumb { 
  width: 100%; 
  background-size: cover;
  background-position: center; 
  background-repeat: no-repeat;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.featured-thumb { height: 300px; }
.card-thumb { height: 280px; }

/* Card Body spacing */
.card-info, .featured-info {
  padding: 24px;
  background: var(--bg-card);
  position: relative;
  z-index: 2; /* Keeps text above background glows */
}

.featured-label {
    display: block;
    font-size: 10px;
    color: var(--green-hi);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Hover triggers */
.card-link:hover .featured-card, 
.card-link:hover .project-card {
  transform: translateY(-12px);
  border-color: var(--green-hi);
  box-shadow: 0 20px 40px rgba(82, 255, 154, 0.15);
}

.card-link:hover .featured-thumb, 
.card-link:hover .card-thumb {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ── ITCH.IO BUTTON ── */
.itch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 28px;
    background: transparent;
    border: 1px solid var(--green-hi);
    color: var(--green-hi);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.itch-button:hover {
    background: var(--green-hi);
    color: var(--bg);
    box-shadow: 0 0 20px rgba(52, 211, 192, 0.4);
    transform: translateY(-2px);
}

.itch-icon { width: 20px; height: 20px; }

/* ── GAME DETAIL CONTAINER (OPTIMIZED NO SCROLL) ── */
.game-detail-container {
    padding: 100px 20px 40px; 
    max-width: 1200px;
    margin: 0 auto;
}

.game-main-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.video-section {
    flex: 1.4;
    min-width: 0;
    max-width: 650px;
}

.text-section {
    flex: 1;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border: 1px solid var(--border-md);
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.game-header h1 {
    font-size: 2.8rem; 
    line-height: 1.1;
    margin-bottom: 10px;
    color: var(--text);
}

.tag-row { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.tag {
    padding: 3px 10px;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    color: var(--green-hi);
    font-family: var(--font-m);
}

.game-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-2);
    background: var(--bg-card);
    padding: 20px;
    border-left: 3px solid var(--green-hi);
    border-radius: 4px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.screenshot-card {
    height: 220px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.footer { border-top: 1px solid var(--border); padding: 24px; text-align: center; background: var(--bg-2); }

@media (max-width: 992px) {
    .game-main-content { flex-direction: column; }
    .video-section { max-width: 100%; }
    .game-header h1 { font-size: 2.2rem; }
    .game-detail-container { padding-top: 90px; }
    .itch-button { width: 100%; }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .profile-ring { width: 150px; height: 150px; }
  .hero { padding-top: 15vh; }
}