/* Portafolio – Cesar De la Rosa. Sin Bootstrap: CSS propio, ligero. */
:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #55627a;
  --line: #d5dde8;
  --accent: #0b6e75;
  --accent-ink: #ffffff;
  --data: #2563eb;
  --web: #0b6e75;
  --apps: #b45309;
  --sec: #9f1239;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
[data-theme="dark"] {
  --bg: #0e1625;
  --surface: #16213a;
  --ink: #e7ecf4;
  --muted: #9aa8c0;
  --line: #26344f;
  --accent: #5cc6cc;
  --accent-ink: #0e1625;
  --data: #7aa2ff;
  --web: #5cc6cc;
  --apps: #f0b35c;
  --sec: #f28aa5;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
section { padding: 4.5rem 0; }

/* Navegación */
.site-nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.menu { display: flex; align-items: center; gap: 1.5rem; }
.menu a { color: var(--muted); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--ink); }
.menu a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.icon-btn, .nav-toggle {
  font: inherit; color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem;
}
.icon-btn:hover, .nav-toggle:hover { border-color: var(--ink); }
.nav-toggle { display: none; }

/* Botones */
.btn {
  display: inline-block; font-weight: 600; text-decoration: none;
  padding: .75rem 1.4rem; border-radius: 8px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Inicio: hero */
.hero { padding: 5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3.5rem; align-items: center; }
.hero .lead { font-size: 1.25rem; color: var(--muted); }
.portrait { border-radius: 28px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border: 1px solid var(--line); }

/* Áreas: el color de la barra identifica cada disciplina */
.areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2rem; }
.area { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 10px; padding: 1.25rem 1.5rem; }
.area p { margin: 0; color: var(--muted); font-size: 1rem; }
.area.data { --c: var(--data); } .area.web { --c: var(--web); }
.area.apps { --c: var(--apps); } .area.sec { --c: var(--sec); }

/* Proyectos: filas, no tarjetas idénticas */
.project { display: grid; grid-template-columns: 340px 1fr; gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--line); align-items: center; }
.project:last-child { border-bottom: 1px solid var(--line); }
.project img { border-radius: 10px; border: 1px solid var(--line); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.project p { color: var(--muted); }

/* Sobre mí / Contacto */
.page-head { padding: 4rem 0 1rem; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.facts { padding: 0; list-style: none; margin: 1.5rem 0; }
.facts li { padding: .9rem 0 .9rem 1rem; border-left: 4px solid var(--c); margin-bottom: .75rem; background: var(--surface); border-radius: 0 8px 8px 0; }
.facts li:nth-child(1) { --c: var(--data); } .facts li:nth-child(2) { --c: var(--web); }
.facts li:nth-child(3) { --c: var(--apps); } .facts li:nth-child(4) { --c: var(--sec); }
form { display: grid; gap: 1.1rem; }
label { font-weight: 600; display: block; margin-bottom: .3rem; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem;
}
.note { color: var(--muted); font-size: .95rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }

footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .95rem; }
footer p { margin: 0; }

@media (max-width: 800px) {
  .hero-grid, .two-col, .project, .areas { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; aspect-ratio: 1; }
  section { padding: 3rem 0; }
  .nav-toggle { display: inline-block; }
  .menu { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem; background: var(--bg); border-bottom: 1px solid var(--line); }
  .menu.open { display: flex; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Repositorios de GitHub */
.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.repo { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.5rem; }
.repo h3 { margin-bottom: .4rem; overflow-wrap: anywhere; }
.repo h3 a { color: var(--ink); text-decoration: none; }
.repo h3 a:hover { color: var(--accent); }
.repo p { color: var(--muted); font-size: 1rem; flex: 1; }
.repo .meta { color: var(--muted); font-size: .9rem; margin: 0; }
.repo img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 1rem; }

/* Proyectos: etiquetas y enlaces */
.project.no-img { grid-template-columns: 1fr; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1rem; }
.tags li { font-size: .9rem; padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; }
.links a { font-weight: 600; }
