/* SHARED SYSTEM CORE STYLES */
:root {
  --bg: #050505;
  --surface: #0a0a0f;
  --surface-hover: #111116;
  --text-main: #e0e0e0;
  --text-dim: #808080;
  --accent: #ccff00;
  /* Acid Lime */
  --line: #222222;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* UTILS */
.container {
  max-width: 900px;
  /* Default for projects */
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
}

.container-lg {
  max-width: 1400px;
  /* For Index */
}

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

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

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

/* BACKGROUNDS */
#bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

/* NAVIGATION */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
  /* Default for projects */
  margin-bottom: 4rem;
}

nav.nav-fixed {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
  margin-bottom: 0;
}

.logo,
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.05em;
  font-size: 1.2rem;
}

.nav-logo::before {
  content: "::";
  color: var(--accent);
  margin-right: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

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

/* TYPOGRAPHY */
h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  margin: 1rem 0 2rem 0;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.9;
  margin-bottom: 2rem;
}

h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-top: 4rem;
  margin-bottom: 1rem;
  color: #fff;
}

p {
  color: #ccc;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* HERO */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  max-width: 100vw;
  overflow-x: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  padding: 2rem 5vw;
  position: relative;
  z-index: 10;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  background: rgba(204, 255, 0, 0.05);
  width: fit-content;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(204, 255, 0, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(204, 255, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(204, 255, 0, 0);
  }
}

/* CARDS & GRID */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  margin-top: 8rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 2rem;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align content to bottom */
    transition: 0.4s;
    position: relative;
    overflow: hidden;
    height: 100%;
    cursor: pointer;
    --x: -100px;
    --y: -100px;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.card-lg {
  grid-column: span 1;
}

.card-md {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .card-lg {
    grid-column: span 2;
  }

  .card-md {
    grid-column: span 1;
  }
}

/* Decipher Layer */
.decipher-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1;
    word-break: break-all;
    overflow: hidden;
    color: var(--accent); /* Acid Lime */
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    
    /* MASK: Visible only near mouse */
    mask-image: radial-gradient(circle 100px at var(--x) var(--y), black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle 100px at var(--x) var(--y), black 40%, transparent 100%);
    
    transition: opacity 0.3s;
}

.card:hover .decipher-layer {
    opacity: 0.3; /* Subtle but visible */
}

/* On hover, dim the original content slightly to make code pop? Or keep as is */
.card:hover .card-content {
    z-index: 2;
}

.card:hover {
    border-color: var(--accent);
    /* background: #0f0f15; - removed to let text shine on dark bg */
}

.card-visual {
    display: none;
}

/* Content stays above spotlight */
.card-content {
    position: relative;
    z-index: 2;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border: 1px solid var(--line);
  color: var(--text-dim);
}

/* ABOUT & TRAJECTORY */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  margin-bottom: 8rem;
  margin-top: 8rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.skill-list {
  list-style: none;
  padding: 0;
}

.skill-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.trajectory {
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
}

.timeline-line-container {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.t-item {
  padding-left: 3rem;
  margin-bottom: 6rem;
  position: relative;
  opacity: 0.2;
}

.t-dot {
  position: absolute;
  left: -4px;
  top: 0;
  /* Adjusted in logic usually */
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  box-shadow: 0 0 10px var(--accent);
}

.t-date {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.t-role {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.t-desc {
  font-size: 1rem;
  color: var(--text-dim);
}

/* FOOTER */
.contact-section {
  padding: 8rem 0 2rem 0;
  text-align: center;
}

.cta-big {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  display: block;
  margin: 2rem 0;
  color: #fff;
}

.cta-big:hover {
  color: var(--accent);
}

/* PROJECT PAGE COMPONENTS */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}

.meta-item span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.img-block {
  width: 100%;
  height: 400px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem 0;
  border: 1px solid var(--line);
  color: #555;
  font-family: var(--font-mono);
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin: 4rem 0;
  padding: 2rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

@media (min-width: 768px) {
  .specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.spec-category h3 {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-category ul {
  list-style: none;
  padding: 0;
}

.spec-category li {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
}

.spec-category li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* GAMES PAGE SPECIFIC */
.germs-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 4rem 0;
  flex-wrap: wrap;
}

.germ-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.marquee-section {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 4rem;
}

.marquee-content {
  display: flex;
  gap: 2rem;
  width: fit-content;
}

.screenshot-card {
  width: 260px;
  height: 460px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.title-card {
  width: 350px;
  height: 200px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* GENERIC UTILS FOR CONTENT */
h3 {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.back-link:hover {
  color: var(--accent);
}
