*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:root {
  --ink: #0f0e0b;
  --cream: #fff6dc;
  --cheese: #ffc400;
  --tomato: #ff3d14;
  --display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --body: 'DM Sans', Arial, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --gutter: clamp(1rem, 3vw, 3rem);
}

/* Temas: a página inteira muda de cor; sem JS, cada secção usa o seu. */
[data-theme="ink"], html:not(.motion) [data-section-theme="ink"] {
  --bg: var(--ink); --fg: var(--cream); --muted: #c9c1a9; --accent: var(--cheese);
  --btn-bg: var(--cheese); --btn-fg: var(--ink); --line: rgba(255,246,220,0.22); --card: #1d1b14; --card-fg: var(--cream);
}
[data-theme="cream"], html:not(.motion) [data-section-theme="cream"] {
  --bg: var(--cream); --fg: var(--ink); --muted: #4d4737; --accent: #c42a00;
  --btn-bg: var(--ink); --btn-fg: var(--cream); --line: rgba(15,14,11,0.24); --card: #ffffff; --card-fg: var(--ink);
}
[data-theme="tomato"], html:not(.motion) [data-section-theme="tomato"] {
  --bg: var(--tomato); --fg: var(--ink); --muted: #1f0d05; --accent: var(--cream);
  --btn-bg: var(--ink); --btn-fg: var(--cream); --line: rgba(15,14,11,0.35); --card: var(--ink); --card-fg: var(--cream);
}
[data-theme="cheese"], html:not(.motion) [data-section-theme="cheese"] {
  --bg: var(--cheese); --fg: var(--ink); --muted: #2e2600; --accent: #a81f00;
  --btn-bg: var(--ink); --btn-fg: var(--cheese); --line: rgba(15,14,11,0.35); --card: var(--ink); --card-fg: var(--cream);
}

[data-theme], html:not(.motion) [data-section-theme] { background-color: var(--bg); color: var(--fg); }
html.motion [data-section-theme] { background: transparent; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

body {
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: clip;
  transition: background-color 0.55s ease, color 0.55s ease;
}
body.modal-open { overflow: hidden; }
section { scroll-margin-top: 80px; }
main { display: block; overflow-x: clip; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--tomato);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 300;
  padding: 0.6rem 1rem; border-radius: 8px; background: var(--cheese); color: var(--ink);
}
.skip-link:focus { top: 0.5rem; }

/* NAV */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--gutter);
  color: var(--fg);
  pointer-events: none;
}
nav > * { pointer-events: auto; }
.logo {
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; font-stretch: 75%;
  letter-spacing: -0.02em; text-transform: uppercase; white-space: nowrap;
  color: inherit; text-decoration: none;
  padding: 0.5rem 1rem; border-radius: 100px;
  background: var(--bg); border: 1px solid var(--line);
  transition: background-color 0.55s ease;
}
.nav-links {
  display: flex; gap: 0.25rem; list-style: none;
  padding: 0.25rem; border-radius: 100px;
  background: var(--bg); border: 1px solid var(--line);
  transition: background-color 0.55s ease;
}
.nav-links a {
  display: block; padding: 0.45rem 0.95rem; border-radius: 100px;
  color: inherit; text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--btn-bg); color: var(--btn-fg); }
.nav-contact { display: none; }
.lang-switcher { display: inline-flex; gap: 0.2rem; margin-left: auto; padding: 0.25rem; border-radius: 100px; background: var(--bg); border: 1px solid var(--line); transition: background-color 0.55s ease; }
.lang-switcher button {
  background: transparent; border: none; border-radius: 100px;
  color: inherit; font: 500 0.78rem var(--body);
  padding: 0.4rem 0.6rem; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.lang-switcher button:hover, .lang-switcher button.active { background: var(--btn-bg); color: var(--btn-fg); }
.nav-cta {
  background: var(--btn-bg); color: var(--btn-fg);
  border: none; border-radius: 100px;
  padding: 0.7rem 1.4rem;
  font: 700 0.92rem var(--body);
  cursor: pointer;
  transition: background-color 0.55s ease, color 0.55s ease;
}
.nav-toggle { display: none; background: var(--btn-bg); border: none; cursor: pointer; }
.nav-toggle .hamburger, .nav-toggle .hamburger::before, .nav-toggle .hamburger::after {
  width: 20px; height: 2px; background: var(--btn-fg); display: block;
}
.nav-toggle .hamburger { position: relative; }
.nav-toggle .hamburger::before, .nav-toggle .hamburger::after { content: ''; position: absolute; left: 0; }
.nav-toggle .hamburger::before { top: -6px; }
.nav-toggle .hamburger::after { top: 6px; }

/* BOTÕES */
.btn-primary, .btn-ghost {
  display: inline-block; text-decoration: none; cursor: pointer;
  border-radius: 100px; padding: 0.95rem 2rem;
  font: 700 1rem var(--body);
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); border: 2px solid var(--btn-bg); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; }

/* ABERTURA */
.hero {
  position: relative;
  min-height: max(100svh, 680px);
  overflow: hidden;
  --hero-shift: 0px;
}
.hero-inner {
  position: relative;
  min-height: inherit;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 1.5rem;
  padding: 5.5rem var(--gutter) 2.25rem;
}
.hero-inner.is-clone { position: absolute; inset: 0; pointer-events: none; }
.hero-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.95rem; border-radius: 100px;
  border: 1px solid currentColor;
  font-size: 0.82rem; font-weight: 500;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.7); animation: blink 1.5s infinite; }
@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
  50% { opacity: 0.3; box-shadow: 0 0 8px 2px rgba(34,197,94,0.4); }
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(5.4rem, min(25.5vw, 34vh), 27rem);
  line-height: 0.8; letter-spacing: -0.035em; text-transform: uppercase;
  transform: translateY(var(--hero-shift));
}
.hero-line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.intro-done .hero-line { overflow: visible; }
.hero-line > span { display: block; }
.hero-line2 {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: 100%;
  text-transform: none; letter-spacing: -0.03em; color: var(--accent);
  line-height: 0.9; padding-right: 0.1em;
}
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; }
.hero-sub { max-width: 34rem; font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.5; color: var(--muted); }
.hero-sub strong { color: var(--fg); font-weight: 700; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.hero-hint { font: 500 0.8rem var(--mono); color: var(--accent); }

.hero-reveal {
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  pointer-events: none;
  background-color: var(--bg); color: var(--fg);
  --x0: -50vw; --y0: -50vh; --r0: 0px; --x1: -50vw; --y1: -50vh; --r1: 0px; --x2: -50vw; --y2: -50vh; --r2: 0px;
  --x3: -50vw; --y3: -50vh; --r3: 0px; --x4: -50vw; --y4: -50vh; --r4: 0px; --x5: -50vw; --y5: -50vh; --r5: 0px;
  --holes:
    radial-gradient(circle var(--r0) at var(--x0) var(--y0), #000 98%, transparent 100%),
    radial-gradient(circle var(--r1) at var(--x1) var(--y1), #000 98%, transparent 100%),
    radial-gradient(circle var(--r2) at var(--x2) var(--y2), #000 98%, transparent 100%),
    radial-gradient(circle var(--r3) at var(--x3) var(--y3), #000 98%, transparent 100%),
    radial-gradient(circle var(--r4) at var(--x4) var(--y4), #000 98%, transparent 100%),
    radial-gradient(circle var(--r5) at var(--x5) var(--y5), #000 98%, transparent 100%);
  -webkit-mask-image: var(--holes);
  mask-image: var(--holes);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  display: none;
}
html.motion .hero-reveal { display: block; }
.hero-code {
  position: absolute; inset: 0; padding: 5rem var(--gutter) 1.25rem;
  font: 500 clamp(0.8rem, 1.25vw, 1.15rem) / 1.55 var(--mono);
  color: var(--ink); opacity: 0.72; white-space: pre; overflow: hidden;
}
/* Fundo opaco: o código passa por trás do texto, em vez de se misturar com ele. */
.is-clone .hero-foot, .is-clone .hero-badge, .is-clone h1 { background-color: var(--bg); box-shadow: 0 0 0 0.75rem var(--bg); }
.is-clone h1 { align-self: flex-start; }
.is-clone .hero-sub, .is-clone .hero-sub strong, .is-clone .hero-hint { color: var(--ink); }
.is-clone .hero-line2 { color: var(--ink); }
.is-clone .dot { background: #0b7a34; box-shadow: none; }

.cheese-spot { display: block; }
.cheese-spot-hero {
  position: absolute; z-index: -1;
  right: 2vw; top: 4.5rem;
  width: min(56vw, 82vh); aspect-ratio: 1;
  pointer-events: none;
}
.cheese-stage {
  position: fixed; left: 0; top: 0; z-index: 5;
  transform-origin: center;
  pointer-events: none;
  will-change: transform;
}
html:not(.motion) .cheese-spot { display: none; }

/* FAIXA */
.ticker {
  overflow: hidden; position: relative; z-index: 3;
  background: var(--cheese); color: var(--ink);
  padding: 1rem 0; margin: 0 -2vw;
  transform: rotate(-1.4deg);
}
.ticker-inner { display: flex; gap: 2.5rem; width: max-content; animation: ticker 22s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }
html.motion .ticker-inner { animation-name: ticker-motion; }
@keyframes ticker-motion { to { translate: -50% 0; } }
.ticker-item { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.5rem, 3vw, 2.6rem); text-transform: uppercase; white-space: nowrap; }
.ticker-item span { color: var(--tomato); margin-left: 2.5rem; }

/* SECÇÕES */
section:not(.hero) { padding: clamp(5rem, 11vw, 10rem) var(--gutter); }
.section-inner { max-width: 1320px; margin: 0 auto; }
.section-label {
  display: inline-block;
  font: 500 0.85rem var(--mono);
  color: var(--accent);
  margin-bottom: 1rem;
}
h2 {
  font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(3rem, 10vw, 9.5rem);
  line-height: 0.88; letter-spacing: -0.03em; text-transform: uppercase;
  margin-bottom: clamp(2rem, 5vw, 4rem);
  overflow-wrap: break-word;
}
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.wi { display: inline-block; }

.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; }
.cheese-spot-skills { width: clamp(6.5rem, 17vw, 15rem); aspect-ratio: 1; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.skill-card {
  display: flex; flex-direction: column;
  border-radius: 22px;
  padding: 0.85rem 0.85rem 1.4rem;
  transition: translate 0.25s cubic-bezier(.2,.8,.2,1), rotate 0.25s cubic-bezier(.2,.8,.2,1);
}
.skill-card:nth-child(1) { background: var(--cheese); color: var(--ink); }
.skill-card:nth-child(2) { background: var(--ink); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255,246,220,0.22); }
.skill-card:nth-child(3) { background: var(--tomato); color: var(--ink); }
.skill-card:nth-child(4) { background: var(--ink); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255,246,220,0.22); }
.skill-card:hover { rotate: -1.2deg; translate: 0 -6px; }
.skill-card:nth-child(even):hover { rotate: 1.2deg; }
.skill-name {
  font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(2rem, 2.9vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase;
  margin: 1.1rem 0.55rem 0.45rem;
}
.skill-desc { margin: 0 0.55rem; font-size: 0.95rem; line-height: 1.4; font-weight: 500; }

/* DEMONSTRAÇÕES */
.demo { height: 164px; border-radius: 14px; overflow: hidden; position: relative; font-family: var(--mono); }
.demo-bar { display: flex; align-items: center; gap: 0.25rem; height: 24px; padding: 0 0.6rem; font-size: 0.66rem; }
.demo-bar i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.45; }
.demo-bar span { margin-left: 0.4rem; opacity: 0.75; }

/* Browser */
.demo-browser { background: var(--ink); color: var(--cream); }
.demo-page { position: relative; height: 140px; margin: 0 0.35rem 0.35rem; padding: 0.55rem; border-radius: 9px; background: var(--cream); overflow: hidden; }
.b-nav { height: 6px; width: 34%; border-radius: 3px; background: rgba(15,14,11,0.8); }
.b-title { height: 13px; width: 78%; margin-top: 0.55rem; border-radius: 3px; background: var(--ink); }
.b-short { width: 50%; margin-top: 0.25rem; background: var(--tomato); }
.b-button { width: 58px; height: 16px; margin-top: 0.5rem; border-radius: 100px; background: var(--cheese); box-shadow: inset 0 0 0 1.5px var(--ink); }
.b-cards { display: flex; gap: 0.3rem; margin-top: 0.5rem; }
.b-cards span { flex: 1; height: 28px; border-radius: 5px; background: rgba(15,14,11,0.16); }
.b-cursor {
  position: absolute; left: 62%; top: 62%; width: 0; height: 0;
  border-left: 7px solid var(--ink); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  rotate: 45deg; opacity: 0;
}
.is-live .b-nav { animation: build 7s infinite both; }
.is-live .b-title { animation: build 7s 0.25s infinite both; transform-origin: left; }
.is-live .b-short { animation-delay: 0.45s; }
.is-live .b-button { animation: build 7s 0.7s infinite both, press 7s 0.7s infinite; }
.is-live .b-cards span { animation: build 7s 1s infinite both; }
.is-live .b-cards span:nth-child(2) { animation-delay: 1.15s; }
.is-live .b-cards span:nth-child(3) { animation-delay: 1.3s; }
.is-live .b-cursor { animation: cursor 7s 0.7s infinite both; }
@keyframes build {
  0% { opacity: 0; transform: scaleX(0.3); }
  9%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@keyframes press { 26%, 32% { background: var(--cheese); } 29% { background: var(--tomato); } }
@keyframes cursor {
  0%, 10% { opacity: 0; left: 80%; top: 92%; }
  14% { opacity: 1; left: 80%; top: 92%; }
  27%, 33% { opacity: 1; left: 22%; top: 55%; }
  70% { opacity: 1; left: 70%; top: 25%; }
  84%, 100% { opacity: 0; left: 70%; top: 25%; }
}

/* Terminal */
.demo-terminal { background: #1d1b14; color: var(--cream); }
.log {
  list-style: none; position: absolute; left: 0; right: 0; bottom: 0.45rem;
  padding: 0 0.6rem; font-size: 0.66rem; line-height: 1.75;
}
.log li { display: grid; grid-template-columns: 2.9em minmax(0, 1fr) auto 3.4em; gap: 0.4em; white-space: nowrap; }
.is-live .log li:last-child { animation: log-in 0.3s ease-out; }
@keyframes log-in { from { opacity: 0; translate: 0 0.8em; } }
.log .m { color: var(--cheese); font-weight: 700; }
.log .p { overflow: hidden; text-overflow: ellipsis; }
.log .s { color: #7ee2a0; }
.log .s.bad { color: #ff8a70; }
.log .t { text-align: right; opacity: 0.65; }

/* Telemóvel */
.demo-mobile { display: flex; justify-content: center; align-items: flex-start; padding-top: 0.5rem; background: rgba(15,14,11,0.16); }
.phone {
  --progress: 66%;
  position: relative; width: 112px; height: 196px; padding: 0.95rem 0.55rem 0;
  border-radius: 20px; background: var(--cream);
  box-shadow: 0 0 0 4px var(--ink);
  transition: border-radius 0.4s;
}
.phone[data-os="android"] { border-radius: 12px; }
.phone-notch { position: absolute; left: 50%; top: 5px; width: 34px; height: 7px; translate: -50% 0; border-radius: 10px; background: var(--ink); transition: width 0.4s; }
.phone[data-os="android"] .phone-notch { width: 7px; }
.phone-progress { height: 6px; border-radius: 3px; background: rgba(15,14,11,0.15); overflow: hidden; margin-bottom: 0.45rem; }
.phone-progress span { display: block; height: 100%; width: var(--progress); background: var(--tomato); transition: width 0.45s cubic-bezier(.2,.8,.2,1); }
.habit { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.32rem; }
.habit i { flex: none; width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink); transition: background-color 0.2s, scale 0.3s cubic-bezier(.3,2,.5,1); }
.habit b { flex: 1; height: 6px; border-radius: 3px; background: var(--ink); opacity: 0.8; transition: opacity 0.25s; }
.habit.done i { background: var(--cheese); scale: 1.12; }
.habit.done b { opacity: 0.22; }
.os-label { position: absolute; left: 0; right: 0; top: 96px; text-align: center; font-size: 0.62rem; font-weight: 700; color: var(--ink); }

/* Tabela */
.demo-table { background: #1d1b14; color: var(--cream); padding: 0.55rem 0.6rem; }
.query { display: block; height: 3.1em; font-size: 0.66rem; line-height: 1.5; color: var(--cheese); }
.q-rows { position: relative; height: 104px; margin-top: 0.3rem; }
.q-row {
  --v: 50%;
  position: absolute; left: 0; right: 0; height: 26px;
  display: grid; grid-template-columns: 5.2em minmax(0, 1fr) 1.7em; align-items: center; gap: 0.45em;
  font-size: 0.68rem;
  top: calc(var(--i) * 26px);
  transition: top 0.55s cubic-bezier(.2,.8,.2,1);
}
.q-row:nth-child(1) { --i: 0; --v: 92%; }
.q-row:nth-child(2) { --i: 1; --v: 74%; }
.q-row:nth-child(3) { --i: 2; --v: 58%; }
.q-row:nth-child(4) { --i: 3; --v: 37%; }
.q-name { white-space: nowrap; }
.q-bar { display: block; height: 11px; width: var(--v); border-radius: 3px; background: var(--cheese); transition: width 0.55s cubic-bezier(.2,.8,.2,1); }
.q-value { text-align: right; opacity: 0.8; }

/* PROJETOS */
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
  min-height: 26rem;
  border-radius: 24px; padding: clamp(1.4rem, 3vw, 2.5rem);
  color: var(--ink);
  transition: translate 0.35s cubic-bezier(.2,.8,.2,1), rotate 0.35s cubic-bezier(.2,.8,.2,1);
}
.project-card:nth-child(1) { background: var(--cheese); }
.project-card:nth-child(2) { background: var(--tomato); }
.project-card:nth-child(3) { background: var(--cream); }
.project-card.has-link { cursor: pointer; }
.project-card:hover { translate: 0 -6px; rotate: -0.6deg; }
.project-card.featured { grid-column: 1 / -1; min-height: 30rem; }
.project-num { font: 500 0.95rem var(--mono); }
.project-code {
  font: 500 clamp(0.85rem, 1.5vw, 1.15rem) / 1.5 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.project-card.featured .project-code { font-size: clamp(0.9rem, 2vw, 1.6rem); }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.tag { border: 1.5px solid var(--ink); border-radius: 100px; padding: 0.2rem 0.65rem; font-size: 0.78rem; font-weight: 500; }
.project-title {
  font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.project-card.featured .project-title { font-size: clamp(2.2rem, 6.4vw, 6rem); }
.project-desc { max-width: 42rem; font-size: 1rem; line-height: 1.5; }
.project-arrow { position: absolute; top: clamp(1.2rem, 3vw, 2.3rem); right: clamp(1.4rem, 3vw, 2.5rem); font: 800 clamp(2rem, 4vw, 3.5rem)/1 var(--display); transition: transform 0.25s; }
.project-card.has-link:hover .project-arrow { transform: translate(6px, -6px); }
.stretched-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 24px; }
.stretched-link:focus-visible { outline: none; }
.stretched-link:focus-visible::after { outline: 3px solid var(--ink); outline-offset: -8px; }

/* SOBRE */
.about-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 2rem; align-items: start; }
.cheese-spot-about { width: min(100%, 30rem); aspect-ratio: 1; justify-self: center; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-text p { font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.4; margin-bottom: 1.1rem; font-weight: 500; }
.about-text p strong { font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.stat-card { background: var(--card); color: var(--card-fg); border-radius: 18px; padding: 1.3rem; }
.stat-num { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; color: var(--cheese); }
.stat-label { font-size: 0.9rem; margin-top: 0.4rem; }

/* CONTACTO */
.contact-box { text-align: left; }
.contact-box h2 { font-size: clamp(3.2rem, 13vw, 13rem); margin-bottom: 1.5rem; }
.contact-box p { max-width: 38rem; font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.4; font-weight: 500; margin-bottom: 2.25rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-link {
  display: inline-block; text-decoration: none;
  background: var(--btn-bg); color: var(--btn-fg);
  border-radius: 100px; padding: 1rem 1.6rem;
  font-weight: 700;
}
.contact-link:nth-child(n+2) { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }

/* RODAPÉ */
footer {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem;
  padding: 2rem var(--gutter);
  font-size: 0.85rem;
}

/* JANELA DE CONTACTO */
.modal { display: none; position: fixed; inset: 0; z-index: 200; }
.modal.show { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,14,11,0.72); }
.modal-content {
  --bg: var(--cream); --fg: var(--ink); --muted: #4d4737; --accent: #c42a00; --btn-bg: var(--ink); --btn-fg: var(--cream); --line: rgba(15,14,11,0.35);
  position: relative; z-index: 2;
  width: min(720px, 92%); max-height: 88vh; margin: 6vh auto; overflow-y: auto;
  background: var(--bg); color: var(--fg);
  border-radius: 20px; padding: 1.5rem;
}
.modal-content h2 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1rem; }
.modal-content > .modal-close { position: absolute; right: 0.8rem; top: 0.6rem; background: transparent; border: none; color: inherit; font-size: 1.6rem; cursor: pointer; }
.modal-content form input, .modal-content form textarea {
  width: 100%; padding: 0.7rem 0.85rem; margin: 0.35rem 0;
  border-radius: 10px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font: inherit;
}
.modal-content form input::placeholder, .modal-content form textarea::placeholder { color: #5f5847; }
.modal-content form textarea { min-height: 110px; resize: vertical; }
.form-privacy { margin-top: 0.25rem; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.form-captcha { min-height: 78px; margin-top: 0.75rem; }
.form-status { min-height: 1.25rem; margin-top: 0.25rem; font-size: 0.88rem; font-weight: 500; color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }

/* RESPONSIVO */
@media (max-width: 900px) {
  .logo { font-size: 1.1rem; }
  .nav-links {
    display: none; position: absolute; top: 100%; right: var(--gutter);
    flex-direction: column; border-radius: 18px; padding: 0.5rem;
  }
  .nav-open .nav-links { display: flex; }
  .nav-links .nav-contact { display: block; }
  .nav-cta { display: none; }
  .nav-toggle { order: 3; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; flex: none; }
  .hero-inner { padding-top: 5rem; justify-content: flex-start; }
  .hero-foot { margin-top: auto; }
  .hero-badge { order: 2; }
  .hero h1 { order: 1; }
  .hero-foot { order: 3; }
  .hero { min-height: max(100svh, 760px); }
  .hero h1 { font-size: clamp(5.4rem, 25.5vw, 14rem); }
  .cheese-spot-hero { width: min(84vw, 42vh); right: 8vw; top: calc(5rem + 52vw); }
  .projects-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-head { grid-template-columns: minmax(0, 1fr); }
  .cheese-spot-about { width: min(70vw, 22rem); }
  .project-card { min-height: 22rem; }
}
@media (max-width: 400px) {
  nav { padding: 0.7rem; gap: 0.4rem; }
  .logo { font-size: 0.95rem; }
  .lang-switcher button { font-size: 0.72rem; padding: 0.35rem 0.42rem; }
  .nav-toggle { width: 40px; height: 40px; }
  h2 { font-size: min(13vw, 3rem); }
  .contact-box h2 { font-size: min(14vw, 3.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .nav-links, .lang-switcher, .nav-cta { transition: none; }
  .ticker-inner, html.motion .ticker-inner, .dot { animation: none; }
  .skill-card,.project-card, .project-arrow { transition: none; }
  .demo *, .demo *::before { animation: none !important; transition: none !important; }
  .skill-card:hover, .project-card:hover { translate: none; rotate: none; }
}
