/* =============================================================
 * 8-BIT CLI PORTFOLIO — styles (Dracula theme)
 * Palette: https://draculatheme.com  (purple-accented terminal)
 * ============================================================= */

:root {
  /* Dracula core */
  --bg: #282a36;         /* background */
  --bg-panel: #21222c;   /* darker background */
  --bg-tile: #2d2f3d;    /* raised surface */
  --border: #44475a;     /* current line / selection */
  --text: #f8f8f2;       /* foreground */
  --text-dim: #6272a4;   /* comment */

  /* Dracula accents */
  --purple: #bd93f9;
  --green: #50fa7b;
  --cyan: #8be9fd;
  --pink: #ff79c6;
  --orange: #ffb86c;
  --red: #ff5555;
  --yellow: #f1fa8c;

  /* Semantic roles */
  --primary: var(--purple);  /* headings, primary button, portrait */
  --accent: var(--pink);     /* secondary button, links */
  --primary-glow: rgba(189, 147, 249, 0.4);

  --font-pixel: "Press Start 2P", monospace;
  --font-term: "VT323", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, #2b2d3a 0%, var(--bg) 70%);
  color: var(--text);
  font-family: var(--font-term);
  font-size: 20px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT scanline overlay */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  mix-blend-mode: multiply;
}

.crt {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ---------- Prompt bits ---------- */
.prompt { font-family: var(--font-term); color: var(--text-dim); margin: 0 0 6px; font-size: 18px; }
.prompt__user { color: var(--green); }
.prompt__path { color: var(--cyan); }
.cmd { color: var(--text); }
.cmd::after {
  content: "";
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--primary);
  margin-left: 4px;
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Window chrome ---------- */
.window {
  border: 2px solid var(--border);
  background: var(--bg-panel);
  box-shadow: 0 0 0 2px #191a21, 0 0 24px var(--primary-glow);
}
.window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #191a21;
  border-bottom: 2px solid var(--border);
}
.window__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border);
}
.window__dot:nth-child(1) { background: var(--red); }
.window__dot:nth-child(2) { background: var(--yellow); }
.window__dot:nth-child(3) { background: var(--green); }
.window__title {
  margin-left: auto;
  font-family: var(--font-term);
  color: var(--text-dim);
  font-size: 16px;
}
.window__body { padding: 24px; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 40px; }
.hero__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
}
.hero__portrait { text-align: center; }
.hero__portrait img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  image-rendering: pixelated;      /* crunchy 8-bit scaling */
  border: 3px solid var(--primary);
  background: var(--bg-panel);
  box-shadow: 0 0 0 3px #191a21, 0 0 18px var(--primary-glow);
}
.hero__caption {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--primary);
  margin: 12px 0 0;
  letter-spacing: 1px;
}
.hero__socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.social {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  color: var(--text);
  border: 2px solid var(--border);
  background: var(--bg-panel);
  box-shadow: 3px 3px 0 #191a21;
  transition: transform 0.05s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.social:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 3px 3px 0 #191a21, 0 0 12px var(--primary-glow);
}
.social:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #191a21; }

.hero__name {
  font-family: var(--font-pixel);
  font-size: 26px;
  color: var(--primary);
  margin: 4px 0 8px;
  text-shadow: 2px 2px 0 #191a21, 0 0 12px var(--primary-glow);
  line-height: 1.3;
}
.hero__role { color: var(--cyan); margin: 0 0 12px; font-size: 20px; }
.hero__text { color: var(--text); max-width: 60ch; margin: 0 0 22px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-decoration: none;
  padding: 14px 18px;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.05s ease, background 0.15s ease, color 0.15s ease;
  box-shadow: 4px 4px 0 #191a21;
}
.btn:hover { background: var(--primary); color: var(--bg); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 #191a21; }
.btn--primary { border-color: var(--primary); color: var(--primary); }
.btn--ghost { border-color: var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--bg); }
.btn__icon { font-size: 13px; }

/* ---------- Projects section ---------- */
.section__title {
  font-family: var(--font-term);
  font-size: 22px;
  color: var(--text-dim);
  margin: 0 0 20px;
  border-bottom: 2px dashed var(--border);
  padding-bottom: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ---------- Tile (modular unit) ---------- */
.tile {
  border: 2px solid var(--border);
  background: var(--bg-tile);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 4px 4px 0 #191a21;
}
.tile:hover {
  transform: translate(-2px, -2px);
  border-color: var(--primary);
  box-shadow: 6px 6px 0 #191a21, 0 0 18px var(--primary-glow);
}

.tile__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.tile__logo-wrap {
  width: 56px; height: 56px;
  border: 2px solid var(--border);
  background: var(--bg-panel);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.tile__logo {
  width: 44px; height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.tile__name {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--primary);
  margin: 4px 0 0;
  line-height: 1.4;
}
.tile__blurb { color: var(--text); margin: 0; font-size: 18px; }

.tile__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-term);
  font-size: 14px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 1px 6px;
}

/* ---------- Status badge ---------- */
.status {
  font-family: var(--font-pixel);
  font-size: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 2px solid;
  white-space: nowrap;
  height: fit-content;
}
.status__box {
  display: inline-grid;
  place-items: center;
  width: 14px; height: 14px;
  font-size: 10px;
}
.status--live { color: var(--green); border-color: var(--green); }
.status--live .status__box { background: var(--green); color: var(--bg); }
.status--dead { color: var(--red); border-color: var(--red); }
.status--dead .status__box { background: var(--red); color: var(--bg); }
.status--wip { color: var(--orange); border-color: var(--orange); }
.status--wip .status__box { background: var(--orange); color: var(--bg); }

/* ---------- Tile links ---------- */
.tile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.tile__link {
  font-family: var(--font-term);
  font-size: 16px;
  text-decoration: none;
  color: var(--cyan);
  border: 1px solid var(--border);
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.tile__link:hover {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
}
.tile__link-icon { font-size: 14px; }

.empty { color: var(--text-dim); font-size: 18px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 50px;
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
  border-top: 2px dashed var(--border);
  padding-top: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  body { font-size: 18px; }
  .hero__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero__text { text-align: left; }
  .hero__actions { justify-content: center; }
  .hero__name { font-size: 20px; }
  .window__body { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
