/* ============================================================
   Santiago Coto Vila — Portfolio
   Minimalista · profesional · blanco y negro
   ============================================================ */

:root {
  /* Acento monocromo */
  --accent: #0a0a0a;
  --grad: linear-gradient(120deg, #2b2b2b 0%, #000000 100%);

  /* Fondos */
  --bg:      #ffffff;
  --mint:    #f5f5f5;   /* banda / superficies suaves */
  --sky:     #f0f0f0;
  --surface: #ffffff;

  /* Texto */
  --ink:       #0a0a0a;
  --ink-soft:  #52525b;
  --ink-faint: #9ca3af;

  /* Líneas / sombras */
  --line:      rgba(10, 10, 10, 0.11);
  --line-soft: rgba(10, 10, 10, 0.06);
  --shadow:    0 30px 70px -34px rgba(0, 0, 0, 0.22);
  --shadow-sm: 0 12px 32px -20px rgba(0, 0, 0, 0.15);

  --maxw:   1120px;
  --radius: 22px;
}

[data-es], [data-en] {
  white-space: pre-line;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.62;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--ink);
}
h1 { font-size: clamp(2.35rem, 5.4vw, 3.9rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.026em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.98rem; }

p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-soft); }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

/* --------------------------- Botones --------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-primary { background: #0a0a0a; color: #ffffff; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5); }
.btn-primary:hover { background: #000; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: rgba(10, 10, 10, 0.32); }
.btn-dark { background: #0a0a0a; color: #fff; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.5); }

/* --------------------------- Nav --------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.05);
  border: 1px solid var(--line-soft);
}
.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.lang-toggle button.active { background: #0a0a0a; color: #fff; }

/* --------------------------- Hero --------------------------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 84px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(720px 480px at 82% 4%, rgba(10, 10, 10, 0.05), transparent 62%),
    linear-gradient(180deg, #fafafa 0%, #ffffff 72%);
}
.hero-inner { max-width: 820px; }

.hero-copy h1 { margin-bottom: 22px; }
.hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--ink-soft); max-width: 580px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; }

.hero-meta { list-style: none; display: flex; gap: 34px; margin: 38px 0 0; padding: 30px 0 0; border-top: 1px solid var(--line); }
.hero-meta li { display: flex; flex-direction: column; }
.hero-meta strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-meta span { font-size: 0.85rem; color: var(--ink-faint); }

/* --------------------------- Secciones --------------------------- */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head-left { margin-bottom: 34px; }

/* About */
.about-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 60px; align-items: start; }
.about-grid h2 { margin-bottom: 18px; }
.about-portrait img { width: 100%; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.about-points { list-style: none; margin: 22px 0 0; padding: 0; }
.about-points li { padding: 14px 0; border-top: 1px solid var(--line); }
.about-points li:last-child { border-bottom: 1px solid var(--line); }
.about-points strong { display: block; font-weight: 700; color: var(--ink); font-size: 0.98rem; margin-bottom: 3px; }
.about-points span { color: var(--ink-soft); font-size: 0.94rem; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.fact {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.fact-k { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 700; }
.fact-v { font-weight: 600; color: var(--ink); }

/* --------------------------- Nolana --------------------------- */
.nolana { background: linear-gradient(180deg, var(--bg), var(--mint) 55%, var(--bg)); }
.nolana-head { margin-bottom: 46px; }
.nolana-title { display: flex; align-items: center; gap: 18px; }
.nolana-title img { width: 66px; height: 66px; border-radius: 16px; box-shadow: var(--shadow); }
.nolana-title h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.nolana-title p { margin: 6px 0 0; }

.nolana-split { display: grid; grid-template-columns: 1fr 0.8fr; gap: 56px; align-items: center; margin-bottom: 64px; }
.lead-sm { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 8px; }

.feat-list { list-style: none; margin: 24px 0 26px; padding: 0; }
.feat-list li { display: flex; gap: 15px; padding: 16px 0; border-top: 1px solid var(--line); }
.feat-list li:last-child { border-bottom: 1px solid var(--line); }
.feat-ico {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; background: #0a0a0a; color: #fff; font-size: 0.72rem;
}
.feat-list h3 { margin-bottom: 2px; }
.feat-list p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.tech-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tech-row span {
  font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px;
}
.nolana-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.nolana-phone { display: flex; justify-content: center; }
.nolana-phone img { width: 100%; max-width: 300px; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.26)); }

/* Galería */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  gap: 26px; overflow-x: auto; padding: 24px 4px 52px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.gallery figure {
  margin: 0; scroll-snap-align: center; text-align: center;
  transition: transform .28s ease;
}
.gallery figure:hover { transform: translateY(-8px); }
.gallery img {
  width: 100%;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.17));
}
.gallery figcaption { margin-top: 16px; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); }

/* --------------------------- Skills --------------------------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.skill-card h4 { margin-bottom: 15px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: 0.84rem; font-weight: 600; color: var(--ink-soft);
  background: var(--mint); border: 1px solid var(--line-soft);
  padding: 6px 13px; border-radius: 999px;
}

/* --------------------------- Experience --------------------------- */
.experience { background: linear-gradient(180deg, var(--bg), var(--sky)); }
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 26px 26px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #0a0a0a; box-shadow: 0 0 0 4px var(--bg);
}
.tl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.tl-top h3 { font-size: 1.05rem; }
.tl-date { font-size: 0.82rem; color: var(--ink-faint); font-weight: 600; white-space: nowrap; }
.timeline p { margin: 0 0 4px; font-size: 0.94rem; }
.tag {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: #fff; background: #0a0a0a;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}

/* --------------------------- Contact --------------------------- */
.contact { text-align: center; }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact h2 { margin-bottom: 14px; }
.contact-sub { font-size: 1.1rem; margin-bottom: 30px; }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.contact-meta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; color: var(--ink-faint); font-size: 0.92rem; }
.contact-meta a { color: var(--ink-soft); font-weight: 600; }
.contact-meta a:hover { color: var(--ink); }

/* --------------------------- Footer --------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.footer-note { margin: 0; font-size: 0.86rem; color: var(--ink-faint); }

/* --------------------------- Reveal --------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* --------------------------- Responsive --------------------------- */
@media (max-width: 900px) {
  .about-grid, .nolana-split, .exp-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .nolana-phone img { max-width: 260px; }
  .about-portrait { max-width: 400px; margin: 0 auto; }
  .nav-links { display: none; }
  .nav-inner { justify-content: flex-end; }
  .section { padding: 72px 0; }
  .hero { padding: 60px 0 64px; }
}
@media (max-width: 560px) {
  .skills-grid, .about-cards { grid-template-columns: 1fr; }
  .hero-meta { gap: 22px; flex-wrap: wrap; }
  .gallery { grid-auto-columns: minmax(170px, 76%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .skill-card:hover, .gallery figure:hover { transform: none; }
}
