/* ==========================================================================
   Terminal-inspired dark green theme
   ========================================================================== */

/* Root variables for easy customization */
:root {
  --bg: #06110b;           /* very dark green / near black */
  --bg-2: #07160e;         /* subtle variation */
  --accent: #21ff6a;       /* neon green */
  --accent-dim: #18c754;   /* dim neon */
  --text: #cdecd7;         /* soft pale green text */
  --text-dim: #9cc9ad;     /* dimmer text */
  --line: #0d2016;         /* subtle borders */
  --card: #0a1510;         /* card background */
  --shadow: rgba(33, 255, 106, 0.08);
}

/* Base reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Boot screen */
#boot-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 600px at 20% 20%, #07150e 0%, var(--bg) 60%);
  display: grid;
  place-items: center;
  z-index: 9999;
}
.boot-inner {
  width: min(720px, 90vw);
  border: 1px solid var(--line);
  background: #09130e;
  padding: 20px;
  box-shadow: 0 10px 40px var(--shadow);
}
.boot-line {
  color: var(--text-dim);
  margin: 4px 0;
}
.boot-progress { margin-top: 14px; display: grid; gap: 8px; }
.boot-bar {
  width: 100%;
  height: 8px;
  border: 1px solid var(--accent);
  background: #06130c;
  position: relative;
  overflow: hidden;
}
.boot-fill {
  position: absolute;
  inset: 0 100% 0 0; /* initial width 0 */
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  animation: boot-fill 1.7s ease-in forwards, boot-pulse 0.8s linear infinite alternate;
}
.boot-status {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
@keyframes boot-fill {
  to { inset: 0 0 0 0; }
}
@keyframes boot-pulse {
  from { filter: brightness(0.9); }
  to { filter: brightness(1.15); }
}

/* Binary background canvas ensures content sits on top */
#binary-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.12; /* very subtle */
  pointer-events: none;
}

/* Layout */
#app { position: relative; z-index: 1; }
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.container {
  width: min(1000px, 92vw);
  margin: 0 auto;
  padding: 0 4px;
}
.section-title {
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--accent);
  letter-spacing: 0.06em;
  margin: 0 0 20px 0;
}

/* Hero */
.hero { padding-top: 120px; background: linear-gradient(180deg, var(--bg-2), var(--bg) 40%); }
.hero-title {
  font-size: clamp(28px, 4.5vw, 44px);
  margin: 0 0 10px 0;
}
.caret { color: var(--accent); margin-right: 6px; }
.hero-quote {
  color: var(--text-dim);
  font-size: clamp(14px, 2.2vw, 18px);
  margin: 0 0 24px 0;
}

/* Terminal typing */
.terminal {
  border: 1px solid var(--line);
  background: #09130e;
  box-shadow: 0 10px 40px var(--shadow);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #0a140f;
}
.led { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.led-red { background: #ff5f56; }
.led-yellow { background: #ffbd2e; }
.led-green { background: #27c93f; }
.tty-label { margin-left: auto; color: var(--text-dim); font-size: 12px; }
.terminal-body {
  padding: 16px;
  font-size: clamp(14px, 2.2vw, 18px);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.prompt { color: var(--accent); }
.cursor {
  display: inline-block;
  width: 10px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.typed { color: var(--text); }

/* About */
.about-text { color: var(--text-dim); line-height: 1.7; }

/* Grid of language cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: 0 16px 30px var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
  overflow: hidden;
}
.card:focus { outline: 1px dashed var(--accent); }
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px var(--shadow);
  border-color: var(--accent);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-title { margin: 0; color: var(--accent); font-size: 18px; }
.card-body { margin: 0; color: var(--text-dim); }

/* SVG wrap pulse/glow */
.svg-wrap { width: 92px; height: 92px; display: grid; place-items: center; }
.lang-card:hover .svg-wrap svg { filter: drop-shadow(0 0 6px rgba(33,255,106,0.25)); }
.lang-card[data-lang="cpp"]:hover { animation: exec-pulse 900ms ease-in-out infinite alternate; }
.lang-card[data-lang="csharp"]:hover { animation: exec-pulse 900ms ease-in-out infinite alternate; }
.lang-card[data-lang="python"]:hover { animation: exec-pulse 900ms ease-in-out infinite alternate; }
.lang-card[data-lang="javascript"]:hover { animation: exec-pulse 900ms ease-in-out infinite alternate; }
.lang-card[data-lang="gdscript"]:hover { animation: exec-pulse 900ms ease-in-out infinite alternate; }
@keyframes exec-pulse {
  from { transform: translateY(-2px) scale(1.00); }
  to   { transform: translateY(-3px) scale(1.02); }
}

/* Tools as modules/layers */
.modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.module {
  position: relative;
  background: linear-gradient(180deg, #0a1610, #09130e);
  border: 1px solid var(--line);
  padding: 14px;
}
.module::before, .module::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  border-top: 1px dashed var(--line);
}
.module::before { top: 6px; }
.module::after  { bottom: 6px; }
.module-title { color: var(--accent); margin-bottom: 6px; }
.module-desc { color: var(--text-dim); }

/* Profiles as terminal paths */
.paths { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.paths li { border: 1px solid var(--line); padding: 12px; background: #0a1510; }
.paths code { display: block; color: var(--accent); margin-bottom: 6px; }
.path-link { color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--accent); }
.path-link:hover { color: var(--accent); }

/* Philosophy essay */
.philosophy .essay { display: grid; gap: 12px; }
.essay-subtitle { margin: 8px 0; color: var(--accent-dim); font-size: 16px; }
.philosophy p { color: var(--text-dim); line-height: 1.8; }

/* Footer */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.footer-title { color: var(--accent); margin-bottom: 8px; }
.footer-item { color: var(--text-dim); }

/* Responsive tweaks */
@media (min-width: 760px) {
  .modules { grid-template-columns: repeat(3, 1fr); }
}

/* Scroll-based animations (IntersectionObserver toggles .in-view) */
.observe { opacity: 0; transform: translateY(12px); transition: opacity 320ms ease, transform 320ms ease; }
.observe.in-view { opacity: 1; transform: translateY(0); }