@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* =====================
   VARIABLES
===================== */
:root {
  --bg: #0b0c10;
  --panel: #111217;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --border: #1f2933;
}

/* =====================
   RESET
===================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* =====================
   LAYOUT
===================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* =====================
   NAV
===================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-links a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.theme-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* =====================
   HERO
===================== */
.hero {
  margin: 5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: 2.7rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 650px;
}

/* FOTO PERFIL */
.hero-profile {
  display: flex;
  justify-content: center;
}

.hero-profile img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
}

/* =====================
   SECTIONS
===================== */
.section {
  margin-bottom: 5rem;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.section h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-top: 0.5rem;
}

.section p {
  max-width: 700px;
}

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

.skill-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.skill-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

/* =====================
   POSTS / PROYECTOS
===================== */
.post {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* =====================
   LINKS
===================== */
.links {
  list-style: none;
  padding: 0;
}

.links li {
  margin-bottom: 0.75rem;
}

.links a {
  color: var(--accent);
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

/* =====================
   FOOTER
===================== */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* =====================
   ANIMATIONS
===================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================
   LIGHT MODE
===================== */
body.light {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --border: #e5e7eb;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {

  .hero {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-profile img {
    width: 220px;
    height: 220px;
    margin-top: 2rem;
  }

  .nav-links {
    display: none; /* simple, limpio */
  }
}
/* =====================
   DARK MODE TOGGLE 

   /* =====================
   BACK TO TOP BUTTON
===================== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 1000;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  transform: translateY(-4px);
}
