/*
Theme Name: PedroRuizCode
Theme URI: https://github.com/PedroRuizCode
Author: Pedro Ruiz
Description: Personal portfolio with terminal HUD aesthetic and drone flight simulation mode.
Version: 1.0.0
Tags: portfolio, dark, monospace
*/

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

:root {
  --bg:        #0d0d0d;
  --surface:   #141414;
  --border:    #222222;
  --accent:    #00ffcc;
  --accent-dim:rgba(0, 255, 204, 0.1);
  --text:      #e8e8e8;
  --muted:     #888888;
}

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

html { font-size: 16px; }

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background-color: var(--bg);
  background-image: radial-gradient(circle, #1c1c1c 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1; padding-top: 48px; display: flex; flex-direction: column; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
}
a:hover { text-shadow: 0 0 8px var(--accent); }

/* Twemoji */
img.emoji {
  height: 1.2em;
  width: 1.2em;
  vertical-align: -0.15em;
  display: inline-block;
  transition: transform 0.18s ease, filter 0.18s ease;
}
img.emoji:hover {
  transform: scale(1.45) rotate(8deg);
  filter: drop-shadow(0 0 5px var(--accent));
}

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 48px;
  background: rgba(13,13,13,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.site-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header .site-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-shadow: none;
}
.site-header nav a {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 20px;
  letter-spacing: 0.05em;
}
.site-header nav a:hover { color: var(--text); text-shadow: none; }

/* Language switcher */
.lang-switcher {
  display: flex;
  list-style: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.lang-switcher li a,
.lang-switcher li span {
  display: block;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-radius: 3px;
  text-shadow: none;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.lang-switcher li a:hover { background: var(--border); color: var(--text); }
.lang-switcher li.current-lang a,
.lang-switcher li.current-lang span {
  background: var(--accent);
  color: #0d0d0d;
}

/* ── MAIN ───────────────────────────────────────── */

/* ── HUD CARD ───────────────────────────────────── */
#normal-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 24px 16px;
}

.hud-card {
  width: 100%;
  max-width: 600px;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px var(--accent), 0 0 40px rgba(0,255,204,0.05);
  background: var(--surface);
}

.hud-row {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.hud-row:last-child { border-bottom: none; }

.hud-label {
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 8px;
}

.hud-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.hud-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.hud-jobs { list-style: none; font-size: 0.82rem; color: var(--muted); }
.hud-jobs li::before { content: "> "; color: var(--accent); opacity: 0.6; }
.hud-jobs li + li { margin-top: 4px; }

.hud-stack { font-size: 0.82rem; color: var(--muted); }
.hud-stack span { color: var(--text); }

/* Missions */
.mission-list { list-style: none; }
.mission-list li + li { border-top: 1px solid var(--border); }
.mission-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 0.15s;
}
.mission-list a:hover { color: var(--text); text-shadow: none; }
.mission-list a::before { content: "▸ "; color: var(--accent); flex-shrink: 0; }
.mission-list .mission-title { flex: 1; }
.mission-list .mission-date {
  font-size: 0.72rem;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.mission-list a:hover .mission-date { opacity: 0.8; }
.mission-list .no-posts { font-size: 0.82rem; color: var(--muted); padding: 8px 0; }

/* Social */
.hud-social { display: flex; gap: 12px; flex-wrap: wrap; }
.hud-social a {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 12px;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
  text-shadow: none;
}
.hud-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px rgba(0,255,204,0.2);
}

/* Enter game button */
.hud-enter-game { text-align: center; padding: 22px 24px; }
.btn-game {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 12px 28px;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
}
.btn-game:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 22px rgba(0,255,204,0.22);
}

/* ── GAME MODE ───────────────────────────────────── */
#game-mode {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
#game-mode iframe { width: 100%; height: 100%; border: none; display: block; }

.btn-exit-game {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 201;
  background: rgba(13,13,13,0.85);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 6px 14px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: border-color 0.15s, color 0.15s;
  backdrop-filter: blur(4px);
}
.btn-exit-game:hover { border-color: var(--accent); color: var(--accent); }

/* ── BLOG / POSTS ────────────────────────────────── */
.posts-wrap, .single-wrap, .page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.posts-wrap h1, .page-wrap h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.post-card { border-bottom: 1px solid var(--border); padding: 24px 0; }
.post-card:last-child { border-bottom: none; }
.post-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.05em; }
.post-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.post-card h2 a { color: var(--text); text-shadow: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-excerpt { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }
.read-more { display: inline-block; margin-top: 10px; font-size: 0.78rem; color: var(--accent); opacity: 0.7; }
.read-more:hover { opacity: 1; text-shadow: 0 0 6px var(--accent); }

/* Single */
.entry-title { font-size: 1.3rem; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.entry-content { font-size: 0.88rem; line-height: 1.8; color: var(--muted); margin-top: 28px; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h2, .entry-content h3 { color: var(--text); margin: 1.5em 0 0.6em; }
.entry-content code { background: var(--surface); border: 1px solid var(--border); padding: 1px 6px; font-size: 0.85em; color: var(--accent); }
.entry-content pre { background: var(--surface); border: 1px solid var(--border); padding: 16px; overflow-x: auto; margin: 1.2em 0; }
.entry-content pre code { border: none; padding: 0; }
.entry-content img { max-width: 100%; height: auto; }

/* ── FOOTER ──────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 640px) {
  .hud-name { font-size: 1.2rem; }
  .hud-row { padding: 14px 16px; }
  .hud-enter-game { padding: 18px 16px; }
  .btn-game { font-size: 0.82rem; padding: 10px 20px; }
}
