/* ============================================================
   JOHN ADEGOKE — PORTFOLIO STYLES
   Retro CRT terminal aesthetic — Hallucino theme
   Fonts: VT323 (body), Press Start 2P (headings)
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --bg: #0a0a0a;        /* Near-black background */
  --green: #00ff41;     /* Matrix green — primary text */
  --amber: #ffb000;     /* Amber — headings, highlights */
  --dim: #00aa2a;       /* Dim green — borders, muted text */
  --scanline: rgba(0,0,0,0.15); /* CRT scanline overlay */
}

/* Reset — remove default browser margins/padding */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Base body ---- */
body {
  background: var(--bg);
  color: var(--green);
  font-family: 'VT323', monospace;  /* Terminal font — 20px base size */
  font-size: 20px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- CRT Scanline overlay ---- */
/* Repeating horizontal lines simulate old CRT monitors */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    var(--scanline) 2px,
    var(--scanline) 4px
  );
  pointer-events: none;  /* Click-through — overlay doesn't block interaction */
  z-index: 9999;
}

/* ---- CRT flicker effect ---- */
/* Subtle opacity animation mimics phosphor glow instability */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,255,65,0.02);
  pointer-events: none;
  z-index: 9998;
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0%   { opacity: 0.97; }
  50%  { opacity: 1; }
  100% { opacity: 0.97; }
}

/* ---- Cursor blink for section headings ---- */
@keyframes blink { 50% { opacity: 0; } }

/* ---- Links ---- */
a {
  color: var(--amber);
  text-decoration: none;
}
a:hover {
  color: var(--green);
  text-shadow: 0 0 8px var(--green);  /* Glow on hover */
}

/* ---- Layout container ---- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* ---- Boot screen (shown before page loads) ---- */
#boot {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#boot-text {
  font-family: 'VT323', monospace;
  color: var(--green);
  font-size: 20px;
  white-space: pre;  /* Preserves line breaks in boot messages */
}

/* ---- Header block ---- */
header {
  border: 2px solid var(--green);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow:
    0 0 20px rgba(0,255,65,0.2),
    inset 0 0 20px rgba(0,255,65,0.05);
}

/* Main name — Press Start 2P pixel font */
h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.4rem;
  color: var(--green);
  text-shadow: 0 0 10px var(--green);
  margin-bottom: 1rem;
  line-height: 2;
}

.title {
  color: var(--amber);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  font-size: 0.9rem;
}
.contact-line span { color: var(--dim); }

/* ---- Navigation bar ---- */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--dim);
}

nav a {
  color: var(--green);
  font-size: 1rem;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--green);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

nav a:hover,
nav a.active {
  background: var(--green);
  color: var(--bg);
  text-shadow: none;
}

/* ---- Sections ---- */
section {
  margin-bottom: 2rem;
  border: 1px solid var(--dim);
  padding: 1.5rem;
}

/* Section titles — Press Start 2P, amber, blinking cursor */
h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.65rem;
  color: var(--amber);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--dim);
}
/* Blinking cursor after heading text */
h2::after { content: "_"; animation: blink 1s step-end infinite; }

/* Entry headers */
h3 {
  color: var(--green);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.role { color: var(--amber); }

.meta {
  color: var(--dim);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.entry { margin-bottom: 1.5rem; }
.entry:last-child { margin-bottom: 0; }

/* ---- Bullet lists ---- */
ul {
  list-style: none;
  padding-left: 1.5rem;
}
/* Terminal-style "> " prefix */
ul li::before { content: "> "; color: var(--dim); }
ul li { margin-bottom: 0.3rem; }

/* ---- Project cards grid ---- */
/* Responsive — columns auto-fit based on available width */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.project-card {
  border: 1px solid var(--dim);
  padding: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.project-card:hover {
  box-shadow: 0 0 15px rgba(0,255,65,0.2);
  border-color: var(--green);
}
.project-card h3 {
  font-size: 1.1rem;
  color: var(--amber);
  margin-bottom: 0.4rem;
}
.project-card .stack {
  color: var(--dim);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.project-card p { font-size: 0.95rem; }

/* ---- Skills grid ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.skill-cat h4 {
  color: var(--amber);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
/* "[+] " prefix for skill items */
.skill-cat ul li::before { content: "[+] "; color: var(--amber); }

/* ---- Footer ---- */
footer {
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
  padding: 1rem;
  border-top: 1px solid var(--dim);
  margin-top: 2rem;
}

/* ---- Mobile / small screens ---- */
@media (max-width: 600px) {
  h1 { font-size: 1rem; }
  .container { padding: 1rem; }
}
