/* =========================================================
   Pía Simon — Portfolio
   HTML + CSS puro. Editá variables abajo para cambiar el look.
   ========================================================= */

:root {
  /* Colores */
  --bg: #FAFAF8;
  --bg-alt: #F2EFEA;
  --text: #2A2A2A;
  --text-soft: #6B6B6B;
  --text-muted: #9A9A9A;
  --accent: #C9607A;        /* rosado marca */
  --accent-soft: #EAB8C4;
  --line: #E8E4DF;

  /* Tipografía — todo sans, una sola familia */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --max-w: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --radius-sm: 8px;

  /* Transiciones */
  --t-fast: 180ms ease;
  --t-med: 320ms cubic-bezier(.2,.7,.2,1);
}

/* Reset minimal */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================ HEADER / NAV ================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: 0.22em;
  font-size: 14px;
  color: var(--text);
  transition: opacity var(--t-fast);
}
.logo:hover { opacity: 0.7; }
.logo .logo-pia { color: var(--accent); font-weight: 500; }
.logo .logo-simon { font-weight: 300; }

/* Cuando el logo es una imagen */
.logo-img {
  display: inline-block;
  height: 48px;
  width: auto;
  transition: opacity var(--t-fast);
}
.logo-img-link:hover .logo-img { opacity: 0.7; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-soft);
  position: relative;
  padding: 6px 0;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); font-weight: 500; }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
}

/* Mobile nav toggle (CSS only) */
.nav-toggle { display: none; }
.nav-toggle-btn {
  display: none;
  background: none;
  border: 0;
  width: 32px; height: 32px;
  position: relative;
}
.nav-toggle-btn span,
.nav-toggle-btn span::before,
.nav-toggle-btn span::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--t-fast), top var(--t-fast);
}
.nav-toggle-btn span { top: 50%; }
.nav-toggle-btn span::before { top: -8px; left: 0; right: 0; }
.nav-toggle-btn span::after  { top: 8px;  left: 0; right: 0; }

/* ================ HERO / SECTION HEAD ================ */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
}
.section--tight { padding-top: clamp(32px, 5vw, 56px); padding-bottom: 0; }
.section--projects { padding-top: 16px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--accent);
}
.hero .hero-sub {
  font-size: 16px;
  color: var(--text-soft);
  margin: 0 0 10px;
  max-width: 56ch;
}
.hero-unlp {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0 0 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero .accent-rule {
  width: 56px;
  height: 2px;
  background: var(--accent);
  border: 0;
  margin: 0;
}

/* ================ GRID DE PROYECTOS ================ */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 48px);
  margin-top: clamp(40px, 5vw, 64px);
}
.project {
  display: block;
  position: relative;
}
.project-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.project-thumb img,
.project-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.project:hover .project-thumb img,
.project:hover .project-thumb svg { transform: scale(1.03); }

.project-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.06));
  opacity: 0;
  transition: opacity var(--t-med);
}
.project:hover .project-thumb::after { opacity: 1; }

.project-meta {
  padding: 16px 2px 0;
}
.project-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 0 0 4px;
}
.project-cat {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ================ ABOUT (Sobre mí) ================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.about-image {
  aspect-ratio: 4 / 5;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.about-image img,
.about-image svg { width: 100%; height: 100%; object-fit: cover; }

.about-content h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.about-content p {
  color: var(--text-soft);
  margin: 0 0 18px;
  max-width: 56ch;
}
.about-content p:last-of-type { margin-bottom: 32px; }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 32px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}
.facts dt {
  color: var(--accent);
  font-weight: 400;
  font-size: 14px;
}
.facts dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: var(--accent); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn .ico {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
}

/* ================ DETALLE DE PROYECTO ================ */
.project-head {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 48px);
}
.project-head h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  max-width: 22ch;
  color: var(--accent);
}
.project-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 48px;
  max-width: 720px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.project-info dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 6px;
}
.project-info dd {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}
.project-desc {
  max-width: 70ch;
  color: var(--text-soft);
  margin: 28px 0 0;
}
.project-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 18px;
  transition: background var(--t-fast), color var(--t-fast);
}
.project-link:hover { background: var(--accent); color: #fff; }

.project-gallery {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(48px, 6vw, 80px);
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}
.project-gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.project-gallery img,
.project-gallery svg { width: 100%; height: auto; display: block; }

.project-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 6vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.project-nav a {
  font-size: 14px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--t-fast);
}
.project-nav a:hover { color: var(--accent); }
.project-nav .arrow { font-size: 18px; line-height: 1; }

/* ================ FOOTER ================ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 80px);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.copy { font-size: 13px; color: var(--text-muted); margin: 0; }
.social {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
}
.social a {
  font-size: 14px;
  color: var(--text-soft);
  transition: color var(--t-fast);
}
.social a:hover { color: var(--accent); }

/* ================ ANIMACIONES SUTILES ================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ================ RESPONSIVE ================ */
@media (max-width: 860px) {
  .projects { grid-template-columns: 1fr; gap: 32px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { aspect-ratio: 4/3; order: -1; }

  /* Mobile nav */
  .nav-toggle-btn { display: inline-block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-med);
  }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a {
    display: block;
    padding: 16px var(--gutter);
  }
  .nav-toggle:checked ~ .nav-links { max-height: 240px; }
  .nav-toggle:checked ~ .nav-toggle-btn span { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle-btn span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-btn span::after  { top: 0; transform: rotate(-45deg); }

  .footer-inner { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .nav { padding: 16px var(--gutter); }
  .logo { padding: 8px 14px; font-size: 12px; }
}
