/* --- CSS Variables --- */
:root {
  --bg: #0f0f10;
  --bg-card: #071700;
  --bg-card-hover: #0a3800;
  --text: #e5e5e5;
  --text-secondary: #b8d18d;

  --accent: #00ff41;
  --accent-light: #39ff14;
  --accent-dark: #00cc33;
  --accent-glow: rgba(0, 255, 65, 0.4);

  --button-bg: rgba(0, 48, 0, 1);
  --button-hover: rgba(0, 48, 0, 1);
  --border-color: #3a4570;
  --border-accent: var(--accent);

  --shadow-medium: rgba(0, 0, 0, 0.3);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
}

/* --- Base / Body --- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  position: relative;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* --- Layout --- */
main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 8px;
}

/* --- Typography --- */
h1, h2, h3 {
  margin-top: 0;
  color: var(--accent);
}

/* --- Header --- */
header.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.name {
  font-size: clamp(20px, 4.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.8),
    -2px -2px 4px rgba(0, 128, 0, 0.2),
    0 0 15px var(--accent-glow);
  cursor: default;
}

.tagline {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  margin-top: -16px;
  margin-bottom: -4px;
}

.project-tagline {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  margin-top: -16px;
  margin-bottom: -4px;
}

.center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Navigation --- */
nav.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

nav.links a {
  color: var(--accent);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--button-bg);
  border: 1px solid var(--accent-glow);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

nav.links a:hover {
  background: var(--button-hover);
  transform: translate(-2px, -2px);
  border-color: var(--accent);
  box-shadow:
    4px 4px 12px var(--shadow-heavy),
    -1px -1px 4px var(--button-hover);
}

/* Devlog nav (index + project pages) */
nav.devlog-nav {
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 10px;
}

nav.devlog-nav a {
  min-width: 310px;
  text-align: center;
  font-size: 16px;
  padding: 6px 18px;
}

/* --- Text Links --- */
a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  color: var(--accent-light);
  filter: brightness(1.1);
}

a:visited {
  color: var(--accent-dark);
}

/* --- Project Grid --- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  justify-content: center;
}

/* --- Project Card --- */
.project {
  background: linear-gradient(145deg, #071700, var(--bg-card));
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  z-index: 1;
}

.project h3 {
  text-shadow: 8px 8px 16px rgba(0, 0, 0, 0.9);
  transition: all 0.3s ease;
}

/* --- Project Card Hover Effect --- */
.project-container {
  position: relative;
  overflow: visible;
}

.project-container:hover .project {
  transform: translate(-16px, -12px);
  border: 2px solid var(--accent);
  box-shadow: 
    20px 20px 30px var(--shadow-heavy),
    -6px -6px 20px rgba(0, 255, 65, 0.2),
    0 0 10px var(--accent-glow);
  background: linear-gradient(145deg, #0d170c, var(--bg-card-hover));
}

.project-container:hover .project h3 {
  color: var(--accent);
  text-shadow:
    0 0 8px var(--accent-glow),
    2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* Whole-card clickable link */
.project-main-link {
  text-decoration: none;
  color: inherit;
}

.project-main-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  cursor: pointer;
}

/* --- Video Embed --- */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  z-index: 11;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  z-index: 12;
}

/* --- Lists --- */
ul {
  padding-left: 16px;
  margin: 0;
}

ul li {
  margin-bottom: 4px;
  color: var(--text);
  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.8),
    -1px -1px 2px rgba(0, 0, 0, 0.8);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 2px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 2px;
}