/* ============================================================
   Alexandre Ramos Moreno — Portfolio
   style.css
   ============================================================ */

/* ── TOKENS ── */
:root {
  --bg:         #0b0f1a;
  --bg-alt:     #0f1520;
  --bg-card:    #131929;
  --bg-card-2:  #1a2235;
  --blue:       #3b82f6;
  --blue-light: #60a5fa;
  --blue-dim:   rgba(59,130,246,0.12);
  --blue-glow:  rgba(59,130,246,0.25);
  --text:       #e2e8f0;
  --text-muted: #64748b;
  --text-dim:   #94a3b8;
  --border:     rgba(255,255,255,0.07);
  --border-hi:  rgba(59,130,246,0.35);
  --radius:     10px;
  --font:       'Inter', system-ui, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--blue); }
  50%       { opacity: 0.5; box-shadow: 0 0 3px var(--blue); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: 7px !important;
  padding: 7px 18px !important;
  transition: opacity 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
  opacity: 0.88 !important;
  transform: translateY(-1px) !important;
  background: var(--blue) !important;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--blue-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--blue-dim);
  transform: translateY(-2px);
}

/* ── SECTION COMMON ── */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 48px;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 48px 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 20px;
}

.hero-accent {
  background: linear-gradient(135deg, var(--blue), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* HERO VISUAL — fake terminal */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
}

.hcard-header {
  background: var(--bg-card-2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.hcard-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.hcard-dot.red    { background: #ff5f57; }
.hcard-dot.yellow { background: #febc2e; }
.hcard-dot.green  { background: #28c840; }

.hcard-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 500;
}

.hcard-body {
  padding: 24px;
  font-family: 'SFMono-Regular', 'Fira Code', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.9;
}

.hcard-body p { white-space: nowrap; }
.hcard-body .mt { margin-top: 12px; }

.c-comment { color: #475569; }
.c-key     { color: #93c5fd; }
.c-op      { color: #64748b; }
.c-val     { color: #86efac; }
.c-val.green { color: #4ade80; }
.c-fn      { color: #a78bfa; }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.2s, transform 0.2s;
}

.info-card:hover {
  border-color: var(--border-hi);
  transform: translateX(4px);
}

.info-card-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.info-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}

.skill-group:hover { border-color: var(--border-hi); }

.skill-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.skill-item:hover {
  background: var(--blue-dim);
  color: var(--text);
}

.skill-icon { font-size: 1rem; flex-shrink: 0; }

/* ── TIMELINE (EDUCACIÓN) ── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 10px var(--blue-glow);
}

.timeline-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 3px 10px;
  border-radius: 4px;
}

.project-status {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tech-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-2);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── CONTACT ── */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 64px 48px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-box .section-title {
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-dot { color: var(--border); }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-inner   { padding: 0 24px; }
  .hero        { grid-template-columns: 1fr; padding: 100px 24px 48px; }
  .hero-visual { display: none; }
  .about-grid  { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .section-inner { padding: 0 24px; }
  .contact-box   { padding: 40px 24px; }
  .footer-inner  { padding: 0 24px; }
}

@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-title { font-size: 2.2rem; }
  .section { padding: 64px 0; }
}
