/* =========================================================
   JESÚS FUNES — PORTFOLIO
   Paleta: beige / tinta / marrón cálido.
   Diseño sobrio, editorial y profesional.
   ========================================================= */

:root {
  --paper: #f4efe7;
  --paper-soft: #eee7de;
  --surface: #faf7f2;
  --ink: #201e1b;
  --ink-soft: #49443e;
  --muted: #777066;
  --line: #d4cabd;
  --line-dark: #b9ab9c;
  --accent: #7d6755;
  --accent-soft: #ad9784;
  --footer: #1e1c19;
  --white: #fffdf9;

  --font: "Manrope", Arial, sans-serif;
  --max: 1180px;

  --shadow-small: 0 8px 28px rgba(44, 37, 30, 0.07);
  --shadow-hover: 0 18px 48px rgba(44, 37, 30, 0.10);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 52px));
  margin-inline: auto;
}

.section {
  padding: 112px 0;
}

.section-bordered {
  border-top: 1px solid var(--line);
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1200;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(125, 103, 85, 0.12);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark,
.footer-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 27px;
}

.main-nav a {
  position: relative;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: color 180ms ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--accent);
  transition: right 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  right: 0;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  margin: 5px auto;
  background: var(--ink);
}

/* Shared */

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #c8b29e;
}

.section-heading {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 58px;
  align-items: start;
}

.section-index {
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.section-heading h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.5rem, 4.8vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 600;
}

.section-subcopy {
  max-width: 730px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Hero */

.hero {
  min-height: calc(100svh - 76px);
  display: flex;
  align-items: center;
  padding-top: 78px;
  padding-bottom: 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.78fr);
  gap: 72px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(4rem, 7.2vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 700;
}

.hero-role {
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 800;
}

.hero-intro {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 800;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-dark {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.button-light:hover {
  background: var(--surface);
  border-color: var(--line-dark);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.portrait-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.portrait-label,
.portrait-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portrait-label {
  border-bottom: 1px solid var(--line);
}

.portrait-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-soft);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 600ms cubic-bezier(.22,.61,.36,1);
}

.portrait-card:hover .portrait-frame img {
  transform: scale(1.018);
}

.portrait-footer {
  justify-content: flex-start;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

.portrait-footer span + span::before {
  content: "•";
  margin-right: 9px;
  color: var(--line-dark);
}

/* About */

.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.35fr);
  gap: 72px;
}

.profile-facts {
  border-top: 1px solid var(--ink);
}

.profile-facts > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.profile-facts span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.profile-facts strong,
.profile-facts a {
  font-size: 0.84rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.profile-facts a:hover {
  color: var(--accent);
}

.about-copy {
  max-width: 770px;
}

.about-copy p {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.about-copy .lead {
  color: var(--ink);
  font-size: clamp(1.45rem, 2.15vw, 2rem);
  line-height: 1.5;
  letter-spacing: -0.035em;
  font-weight: 500;
}

/* Projects */

.project-list {
  border-top: 1px solid var(--ink);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
  gap: 54px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.project-card-reverse .project-media {
  order: 2;
}

.project-card-reverse .project-content {
  order: 1;
}

.project-media {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.project-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.22,.61,.36,1);
}

.project-card:hover .project-media img {
  transform: scale(1.012);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-content h3 {
  margin: 0;
  font-size: clamp(2rem, 3.3vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.project-content > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-block {
  margin-top: 25px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.project-block h4 {
  margin: 0 0 7px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-block li + li {
  margin-top: 5px;
}

.tags,
.tool-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags {
  margin-top: 24px;
}

.tags span,
.tool-cloud span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.36);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 25px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: 0.78rem;
  font-weight: 800;
}

.text-link.disabled {
  color: var(--muted);
  pointer-events: none;
  border-bottom-style: dashed;
}

.privacy-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

/* Experience */

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}

.experience-item {
  min-height: 250px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 24px;
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease;
}

.experience-item:hover {
  background: rgba(255, 253, 249, 0.34);
}

.experience-number {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.experience-label {
  margin: 0 0 11px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.experience-item h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.experience-item p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Capabilities */

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}

.capability-card {
  min-height: 220px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.capability-card:hover {
  background: var(--surface);
}

.capability-card > span {
  display: inline-block;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.capability-card h3 {
  margin: 44px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.capability-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Tools */

.tools-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool-group {
  padding: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.25);
}

.tool-group-wide {
  grid-column: 1 / -1;
}

.tool-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-copy {
  max-width: 800px;
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.tool-note {
  max-width: 800px;
  margin: 23px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* Education */

.education-section {
  padding-bottom: 94px;
}

/* Contact */

.contact-section {
  padding: 102px 0;
  color: var(--paper);
  background: var(--footer);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 90px;
  align-items: start;
}

.contact-intro h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 4.7rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.contact-intro > p:last-child {
  max-width: 590px;
  margin: 24px 0 0;
  color: #bcb3a8;
  font-size: 0.95rem;
}

.contact-links {
  border-top: 1px solid rgba(255, 255, 255, 0.20);
}

.contact-links a {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 24px;
  gap: 20px;
  align-items: center;
  padding: 21px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  transition: padding-left 180ms ease;
}

.contact-links a:hover {
  padding-left: 8px;
}

.contact-links span {
  color: #91887f;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.contact-links strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 700;
}

.contact-links b {
  color: #c8b29e;
  font-size: 1rem;
}

/* Footer */

.site-footer {
  color: var(--paper);
  background: var(--footer);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid {
  min-height: 142px;
  display: grid;
  grid-template-columns: 1.25fr auto auto;
  gap: 32px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-mark {
  background: var(--paper);
  color: var(--footer);
}

.footer-brand div {
  display: grid;
  gap: 3px;
}

.footer-brand strong {
  font-size: 0.84rem;
}

.footer-brand span:last-child {
  color: #91887f;
  font-size: 0.72rem;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-nav a {
  color: #b9b0a6;
  font-size: 0.73rem;
  font-weight: 700;
}

.footer-nav a:hover {
  color: var(--paper);
}

.footer-note {
  margin: 0;
  color: #756d65;
  font-size: 0.7rem;
}

/* Reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(.22,.61,.36,1);
}

.reveal-delay {
  transition-delay: 90ms;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */

@media (max-width: 980px) {
  .main-nav {
    gap: 17px;
  }

  .main-nav a {
    font-size: 0.76rem;
  }

  .hero-grid {
    grid-template-columns: 1fr 390px;
    gap: 45px;
  }

  .about-layout {
    gap: 42px;
  }

  .project-card {
    gap: 36px;
  }

  .contact-grid {
    gap: 52px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 34px 0;
    min-height: auto;
  }

  .footer-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(var(--max), calc(100% - 30px));
  }

  .section {
    padding: 82px 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: 76px 0 auto 0;
    display: grid;
    gap: 0;
    padding: 14px 15px 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 220ms ease,
      opacity 220ms ease,
      visibility 220ms ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 14px 5px;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
  }

  .main-nav a::after {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 60px;
  }

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

  .hero-copy h1 {
    font-size: clamp(3.5rem, 13vw, 6rem);
  }

  .portrait-card {
    max-width: 560px;
  }

  .about-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
  }

  .project-card,
  .project-card-reverse {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-card-reverse .project-media,
  .project-card-reverse .project-content {
    order: initial;
  }

  .experience-grid,
  .capability-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tools-layout {
    grid-template-columns: 1fr;
  }

  .tool-group-wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(var(--max), calc(100% - 24px));
  }

  .nav-shell {
    min-height: 70px;
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .section {
    padding: 66px 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 38px;
  }

  .section-index {
    display: block;
    margin-bottom: 16px;
  }

  .section-heading h2 {
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .hero {
    padding-top: 44px;
    padding-bottom: 62px;
  }

  .hero-copy h1 {
    font-size: clamp(3.3rem, 15.2vw, 4.8rem);
  }

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

  .hero-actions .button:first-child {
    grid-column: 1 / -1;
  }

  .button {
    padding-inline: 14px;
  }

  .portrait-label {
    padding: 14px;
  }

  .portrait-footer {
    display: none;
  }

  .profile-facts > div {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .about-copy .lead {
    font-size: 1.35rem;
  }

  .project-card {
    padding: 34px 0;
  }

  .experience-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .experience-item {
    min-height: auto;
    padding: 24px 18px;
  }

  .capability-card {
    min-height: 185px;
  }

  .capability-card h3 {
    margin-top: 32px;
  }

  .contact-section {
    padding: 74px 0;
  }

  .contact-links a {
    grid-template-columns: 78px minmax(0, 1fr) 18px;
    gap: 12px;
  }

  .footer-grid {
    padding: 30px 0;
  }

  .footer-nav {
    gap: 14px;
  }
}
