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

:root {
  --bg:        #0E1117;
  --bg2:       #151B24;
  --bg3:       #1C2433;
  --border:    rgba(255,255,255,0.07);
  --accent:    #4A90D9;
  --accent2:   #2d6ca8;
  --text:      #E8EDF5;
  --muted:     #7A8799;
  --muted2:    #4E5A6A;
  --tag-bg:    #1A2436;
  --tag-text:  #7FB3D9;
  --serif:     'Plus Jakarta Sans', sans-serif;
  --sans:      'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  z-index: 999;
  transition: width 0.1s linear;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74,144,217,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-inner {
  max-width: 760px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  position: relative;
}
.hero-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-label::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
}
.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero-name span { color: var(--accent); }
.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg2);
  transition: all 0.2s;
}
.hero-link:hover { border-color: var(--accent); color: var(--accent); }
.hero-link i { font-size: 0.9rem; }
.hero-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.hero-link.primary:hover { background: var(--accent2); border-color: var(--accent2); color: #fff; }

.hero-photo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #4A90D9;
  box-shadow: 0 0 25px rgba(74,144,217,.35);
  transition: .3s;
}
.hero-photo:hover {
  transform: scale(1.05);
}
.hero-photo-placeholder {
  width: 190px; height: 190px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 3.5rem;
}
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted2);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2.5s ease-in-out infinite;
}
.scroll-hint i { font-size: 1rem; }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* LAYOUT */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.75rem;
}
.section-num {
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.section-line {
  flex: 1; height: 1px;
  background: var(--border);
}

/* SOBRE MI */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.about-text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 300;
}
.about-text p + p { margin-top: 1rem; }
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.info-row i {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 15px;
  text-align: center;
}
.info-row .label {
  color: var(--muted2);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}
.info-row .val { color: var(--text); font-weight: 400; }

/* BADGES */
.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badge {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg2);
  transition: all 0.2s;
}
.badge:hover { border-color: var(--accent); color: var(--accent); }

/* TIMELINE */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.tl-item {
  padding-left: 2.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: 0; top: 4px;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
}
.tl-date {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.tl-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.tl-place {
  font-size: 0.8rem;
  color: var(--muted2);
  margin-bottom: 0.55rem;
}
.tl-body {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.75;
}

/* PROYECTOS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { border-color: rgba(74,144,217,0.3); transform: translateY(-2px); }
.project-type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(74,144,217,0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.9rem;
}
.project-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.project-desc {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 1.1rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tag {
  font-size: 0.72rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid rgba(74,144,217,0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* HERRAMIENTAS */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}
.tool-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: border-color 0.2s, transform 0.2s;
  text-align: center;
}
.tool-item:hover { border-color: rgba(74,144,217,0.35); transform: translateY(-2px); }
.tool-icon { font-size: 1.6rem; color: var(--muted); }
.tool-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  transition: transform 0.2s;
}
.tool-item:hover .tool-img { transform: scale(1.1); }
.tool-name {
  font-size: 0.72rem;
  color: var(--muted2);
  text-align: center;
  font-weight: 500;
}

/* REDES */
.social-section { display: flex; flex-wrap: wrap; gap: 1rem; }
.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.2s, transform 0.2s;
}
.social-card:hover { border-color: rgba(74,144,217,0.3); transform: translateY(-2px); }
.social-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--tag-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.social-label {
  font-size: 0.72rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.social-handle { font-size: 0.9rem; font-weight: 500; color: var(--text); }

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

/* RESPONSIVE */
@media (max-width: 640px) {
  .page { padding: 0 1.25rem 4rem; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-label { justify-content: center; }
  .hero-links { justify-content: center; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: 180px; height: 180px; }
  .scroll-hint { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}
