/* ============================================================
   Lucas ∴ Ciencia & Fantasía — style.css
   Paleta: azul eléctrico #0055ff · naranja cálido #ff6a00
   Tipografía: Orbitron (títulos) · Roboto Mono (detalles)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto+Mono:wght@300;400;500&display=swap');

/* ---- Variables ---- */
:root {
  --blue:       #0055ff;
  --blue-dim:   #003bb5;
  --blue-dark:  #001a66;
  --orange:     #ff6a00;
  --orange-dim: #cc5200;
  --bg:         #060a14;
  --bg2:        #0c1220;
  --bg3:        #111827;
  --border:     #1a2a4a;
  --text:       #d8e4f8;
  --text-muted: #6a85b0;
  --text-dim:   #3a5080;
  --font-head:  'Orbitron', sans-serif;
  --font-mono:  'Roboto Mono', monospace;
  --radius:     6px;
  --radius-lg:  12px;
  --glow-blue:  0 0 18px rgba(0,85,255,0.35);
  --glow-orange:0 0 18px rgba(255,106,0,0.35);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }

/* ---- Header ---- */
.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 1rem 0;
  flex-shrink: 0;
}

.logo-symbol {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--orange);
  font-weight: 900;
}

.logo-text {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ---- Navigation tabs ---- */
.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.nav-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: rgba(0,85,255,0.08);
  box-shadow: var(--glow-blue);
}

.nav-tab.active {
  color: var(--orange);
  border-color: var(--orange);
  background: rgba(255,106,0,0.08);
  box-shadow: var(--glow-orange);
}

/* ---- Layout ---- */
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  opacity: 0.6;
}

.card:hover { border-color: rgba(0,85,255,0.4); }

.card-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: lowercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

/* ---- Bio ---- */
.bio-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--glow-blue);
}

.bio-text h2 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.bio-text p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}

.accent { color: var(--orange); }

.blink { animation: blink 1.5s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- Progress bars ---- */
.game-list { display: flex; flex-direction: column; gap: 1rem; }

.game-item {}

.game-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.game-name {
  font-size: 0.82rem;
  color: var(--text);
}

.game-pct {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  border-radius: 4px;
  animation: fillBar 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.3s;
}

@keyframes fillBar {
  from { width: 0; }
  to   { width: var(--pct); }
}

/* ---- Project list ---- */
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.project-list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.tag-ai    { background: rgba(0,85,255,0.2);   color: #7aa8ff; border: 1px solid rgba(0,85,255,0.4); }
.tag-code  { background: rgba(255,106,0,0.15); color: #ffaa66; border: 1px solid rgba(255,106,0,0.35);}
.tag-misc  { background: rgba(100,80,200,0.15);color: #b8a4ff; border: 1px solid rgba(100,80,200,0.35);}
.tag-done  { background: rgba(0,200,100,0.12); color: #66ddaa; border: 1px solid rgba(0,200,100,0.3); }
.tag-wip   { background: rgba(255,200,0,0.12); color: #ffdd66; border: 1px solid rgba(255,200,0,0.3); }

.see-more {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  transition: color 0.2s;
  letter-spacing: 0.05em;
}
.see-more:hover { color: var(--orange); }

/* ---- Sidebar Widgets ---- */
.widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
}

.widget-title {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Calendar */
.cal-header {
  font-family: var(--font-head);
  font-size: 0.7rem;
  text-align: center;
  color: var(--orange);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-dow {
  font-size: 0.58rem;
  color: var(--text-dim);
  padding: 2px 0;
}

.cal-day {
  font-size: 0.65rem;
  padding: 3px 1px;
  border-radius: 3px;
  color: var(--text-muted);
  cursor: default;
}

.cal-today {
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  border-radius: 3px;
}

/* Visit counter */
.visit-counter { text-align: center; padding: 0.5rem 0; }

.counter-digits {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.counter-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}

/* Comments */
.comment {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  margin-bottom: 0.25rem;
}

.comment.new-comment {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }

.comment-author {
  font-size: 0.7rem;
  color: var(--blue);
  font-weight: 500;
  display: block;
}

.comment p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.2rem 0;
}

.comment-date {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.comment-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.comment-input,
.comment-textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.4rem 0.6rem;
  resize: none;
  transition: border-color 0.2s;
}

.comment-input:focus,
.comment-textarea:focus {
  outline: none;
  border-color: var(--blue);
}

.comment-textarea { height: 60px; }

.comment-btn {
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: all 0.2s;
  align-self: flex-end;
}

.comment-btn:hover {
  background: rgba(0,85,255,0.15);
  box-shadow: var(--glow-blue);
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ---- Subpage specific ---- */

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

.book-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  transition: border-color 0.2s;
}
.book-card:hover { border-color: rgba(0,85,255,0.5); }

.book-title { font-size: 0.8rem; color: var(--text); font-weight: 500; margin-bottom: 0.25rem; }
.book-author { font-size: 0.7rem; color: var(--text-dim); }
.book-status { font-size: 0.65rem; margin-top: 0.4rem; }

/* Lab entries */
.lab-entry {
  border-left: 2px solid var(--blue);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(0,85,255,0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.lab-date { font-size: 0.65rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.lab-title { font-size: 0.9rem; color: var(--text); font-weight: 500; margin-bottom: 0.35rem; }
.lab-body  { font-size: 0.78rem; color: var(--text-muted); }

/* Photo gallery */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.photo-placeholder {
  aspect-ratio: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .sidebar { order: -1; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .main-nav { gap: 0.2rem; }
  .nav-tab  { font-size: 0.68rem; padding: 0.3rem 0.5rem; }

  .bio-inner { flex-direction: column; }
}

/* ---- Scanline texture ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 9999;
}
