﻿:root {
  color-scheme: light;
  --bg: #f7f1ec;
  --surface: #fffdfb;
  --soft: #efe5de;
  --ink: #231d27;
  --muted: #5f535c;
  --accent: #b2403b;
  --accent-ink: #fff;
  --line: #ddcfc6;
  --warm: #9a4a43;
  --ok: #1b7a53;
  --header: #fffdfb;
  --header-ink: #231d27;
  --shadow: 0 18px 50px #5a2f2a26;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 16px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14101a;
  --surface: #1e1825;
  --soft: #191420;
  --ink: #f5ebe8;
  --muted: #bfaeb5;
  --accent: #ff9f92;
  --accent-ink: #1a1018;
  --line: #3a2f44;
  --warm: #ffb8ac;
  --ok: #7fe0b5;
  --header: #14101a;
  --header-ink: #f5ebe8;
  --shadow: 0 18px 50px #0006;
}
/* Base */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.65 "Manrope",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
a,
summary {
  font: inherit;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
a:hover {
  opacity: 0.85;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
  border-radius: 6px;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}
.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 30;
}
.skip:focus {
  top: 12px;
}
/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  position: relative;
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.navlinks a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}
.navlinks a:hover {
  color: var(--ink);
  background: var(--soft);
  opacity: 1;
}
.navlinks a[aria-current="location"] {
  color: var(--accent);
  font-weight: 800;
}
.switches {
  display: flex;
  align-items: center;
  gap: 7px;
}
.nav-cv,
.switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.switch span {
  margin-left: 6px;
}
.nav-cv {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.nav-cv:hover,
.switch:hover {
  border-color: var(--accent);
  opacity: 1;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.94rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost {
  border-color: #fff7f35c;
  color: #fff7f3;
}
.btn:hover,
.social:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  opacity: 1;
}
.btn:active,
.social:active {
  transform: none;
}
.btn svg,
.social svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: none;
}
.socials,
.actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #fff7f340;
  border-radius: 10px;
  background: #ffffff0f;
  color: #fff7f3;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
/* Hero */
.hero {
  margin: 28px 0 0;
  padding: 0;
}
.hero-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(30px, 5.5vw, 68px);
  border-radius: 24px;
  color: #fff7f3;
  background-color: #17121a;
  background-image:
    radial-gradient(60% 80% at 100% 0%, #ff9f9238, transparent 70%),
    radial-gradient(50% 70% at 0% 100%, #7fe0b51f, transparent 70%),
    linear-gradient(#17121aeb, #17121ae0), url("../images/data-banner.png");
  background-size: auto, auto, auto, cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.hero-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(120deg, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(120deg, #000, transparent 70%);
}
.hero-copy {
  min-width: 0;
}
.hero-portrait {
  order: 2;
  display: block;
  width: clamp(160px, 22vw, 260px);
  height: clamp(160px, 22vw, 260px);
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid #fff7f340;
  box-shadow:
    0 0 0 8px #ffffff10,
    0 24px 50px #0006;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 13px;
  border: 1px solid #fff7f333;
  border-radius: 100px;
  background: #ffffff0d;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe3dc;
}
.hero-kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fe0b5;
  box-shadow: 0 0 0 0 #7fe0b580;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(3.1rem, 8vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 800;
}
h1 span {
  color: #ffb8ac;
}
.hero-intro .profile-heading {
  display: block;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #7fe0b5;
}
.hero-intro .profile-heading::before {
  content: "> ";
  color: #ffffff80;
}
.lead {
  max-width: 62ch;
  margin: 0;
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  line-height: 1.65;
  color: #f1e2dd;
}
.hero-actions {
  margin-top: 28px;
}
.hero-intro .socials {
  margin-top: 12px;
}
.profile-focus {
  max-width: 64ch;
  margin: 26px 0 6px;
  padding-top: 20px;
  border-top: 1px solid #fff7f32e;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: #ffd9d0;
}
.profile-languages {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff7f3;
}
/* Pillars */
.pillars {
  grid-column: 1 / -1;
  order: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.pillar {
  padding: 22px 24px;
  border: 1px solid #fff7f32e;
  border-radius: 16px;
  background: #ffffff0c;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}
.pillar:hover {
  transform: translateY(-3px);
  border-color: #ffb8ac99;
  background: #ffffff14;
}
.pillar-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #7fe0b5;
  letter-spacing: 0.1em;
}
.pillar h2 {
  margin: 6px 0 8px;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.pillar p {
  margin: 0 0 10px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: #f1e2dd;
}
.pillar .pillar-stack {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed #fff7f333;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: #ffd9d0;
}
/* Sections */
section {
  position: relative;
  padding: clamp(60px, 9vw, 104px) 0;
}
#sobre-mi,
#proyectos,
#experiencia,
#herramientas {
  isolation: isolate;
}
#sobre-mi::before,
#experiencia::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--soft);
}
.label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.sectionhead {
  max-width: 780px;
  margin-bottom: 36px;
}
h2 {
  margin: 8px 0 16px;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.05em;
  line-height: 1.08;
}
.sectionhead p {
  color: var(--muted);
}
#sobre-mi .sectionhead {
  max-width: 860px;
  margin: 0;
  padding-left: clamp(20px, 4vw, 40px);
  border-left: 3px solid var(--accent);
}
#sobre-mi .sectionhead p {
  max-width: 66ch;
  font-size: 1.05rem;
  line-height: 1.85;
}
#sobre-mi .sectionhead p:last-child {
  margin-bottom: 0;
}
/* Projects */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}
.project-filters button {
  min-height: 42px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.project-filters button:hover {
  border-color: var(--accent);
}
.project-filters button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  counter-reset: project;
}
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.project-card {
  counter-increment: project;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.project-card[open] {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.project-card[hidden] {
  display: none;
}
.project-card > summary {
  position: relative;
  display: block;
  list-style: none;
  padding: 28px;
  cursor: pointer;
}
.project-card > summary::-webkit-details-marker {
  display: none;
}
.project-card > summary::before {
  content: "0" counter(project);
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ok);
}
.project-card .meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warm);
}
.project-card h3 {
  margin: 8px 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}
.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.project-card > summary > p {
  font-size: 0.94rem;
}
.project-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
}
.project-toggle::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}
.project-card[open] .project-toggle::after {
  content: "−";
}
.project-card > .detail {
  margin: 0 28px 28px;
  padding: 18px 0 0;
  border-top: 1px dashed var(--line);
  color: var(--muted);
}
.project-card .detail p + p {
  margin-top: 12px;
}
.project-card::details-content {
  block-size: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    block-size 0.24s ease,
    opacity 0.24s ease,
    content-visibility 0.24s allow-discrete;
  interpolate-size: allow-keywords;
}
.project-card[open]::details-content {
  block-size: auto;
  opacity: 1;
}
/* Experience timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 16px;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--line));
}
.experience-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}
.experience-link::before {
  content: "";
  position: absolute;
  top: 30px;
  left: -34px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--soft);
}
.experience-link:hover {
  opacity: 1;
}
.timeline article {
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.experience-link:hover article {
  transform: translateX(4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.experience-number-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}
.timeline h3 {
  margin: 12px 0 2px;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.timeline h4 {
  margin: 0 0 12px;
  font-size: 0.96rem;
  color: var(--accent);
}
.timeline p {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}
.timeline .read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--accent);
}
/* Education, certifications, stack */
.learning-block + .learning-block {
  margin-top: 52px;
}
.learning-block > h3 {
  display: inline-block;
  margin: 0 0 20px;
  padding-bottom: 8px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  border-bottom: 2px solid var(--accent);
}
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.certification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.learning-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.learning-card h4 {
  margin: 8px 0;
  font-size: 1.05rem;
  line-height: 1.4;
}
.learning-card p {
  margin: 0;
  color: var(--muted);
}
.learning-date {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}
.certificate-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 16px 22px;
}
.certificate-card > div {
  padding: 0 6px;
}
.certificate-visual {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 150px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.75rem;
}
.certificate-visual:hover {
  border-color: var(--accent);
}
.certificate-visual img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: top;
}
.learning-card .credential {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}
.stack-tabs {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
}
.stack-mobile-control {
  display: none;
}
.stack-tablist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stack-tablist button {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}
.stack-tablist button:hover {
  background: var(--soft);
  color: var(--ink);
}
.stack-tablist button[aria-selected="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.stack-panels {
  min-height: 260px;
}
.stack-panel {
  height: 100%;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stack-panel[hidden] {
  display: none;
}
.stack-panel h4 {
  margin: 0 0 22px;
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  letter-spacing: -0.03em;
}
.stack-panel .skills {
  align-content: flex-start;
}
/* Contact */
.contact {
  background: var(--soft);
  border-top: 1px solid var(--line);
}
.contact .sectionhead h2 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}
.copy-hint {
  margin-left: 5px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}
.copy-status {
  display: block;
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ok);
}
.gmail-icon {
  width: 20px;
  height: 20px;
  flex: none;
}
#copy-email {
  max-width: 100%;
  overflow-wrap: anywhere;
  cursor: pointer;
}
footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.footerinner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}
/* Floating controls and modal */
.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(16px, 3vw, 36px);
  z-index: 9;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
  font-size: 1.4rem;
  font-weight: 800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.certificate-modal {
  width: min(1000px, calc(100% - 32px));
  max-height: 92vh;
  padding: 52px 18px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 25px 80px #0008;
}
.certificate-modal::backdrop {
  background: #0c0810d9;
}
.certificate-modal h2 {
  margin: 0 40px 20px 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.certificate-modal img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: auto;
  object-fit: contain;
}
.modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}
.certificate-modal-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}
.certificate-modal-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 1.2rem;
}
.certificate-modal-controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
/* Responsive */
@media (max-width: 1020px) {
  .menu-toggle {
    display: block;
    order: 3;
  }
  .navlinks {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    display: none;
    min-width: 220px;
    margin: 0;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow);
  }
  .navlinks[data-open="true"] {
    display: grid;
    gap: 4px;
  }
  .navlinks a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 9px 14px;
    font-size: 0.95rem;
  }
  .switches {
    margin-left: auto;
  }
  .certification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .hero-intro {
    grid-template-columns: 1fr;
    padding: 34px 24px;
  }
  .hero-portrait {
    order: -1;
    width: 132px;
    height: 132px;
    border-radius: 24px;
  }
  .pillars,
  .grid,
  .education-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .stack-tabs {
    grid-template-columns: 1fr;
  }
  .stack-tablist {
    display: none;
  }
  .stack-mobile-control {
    position: relative;
    display: block;
  }
  .stack-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 52px;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 750;
    text-align: left;
  }
  .stack-menu-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.18s ease;
  }
  .stack-menu-trigger[aria-expanded="true"] .stack-menu-arrow {
    transform: translateY(2px) rotate(225deg);
  }
  .stack-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 5;
    display: grid;
    gap: 3px;
    width: 100%;
    max-height: min(55vh, 360px);
    overflow-y: auto;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .stack-menu[hidden] {
    display: none;
  }
  .stack-menu button {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
    text-align: left;
  }
  .stack-menu button:hover,
  .stack-menu button:focus-visible {
    background: var(--soft);
  }
  .stack-menu button[aria-selected="true"] {
    background: var(--accent);
    color: var(--accent-ink);
  }
  .stack-panels {
    min-height: 0;
  }
}
@media (max-width: 640px) {
  .certification-grid {
    grid-template-columns: 1fr;
  }
  .timeline {
    padding-left: 28px;
  }
  .experience-link::before {
    left: -28px;
  }
  .timeline article {
    padding: 22px;
  }
  .project-card > summary {
    padding: 22px;
  }
  .project-card > .detail {
    margin: 0 22px 22px;
  }
  .hero-actions .btn,
  .actions .btn {
    flex: 1 1 100%;
  }
}
@media (max-width: 520px) {
  .wrap {
    width: min(1120px, calc(100% - 32px));
  }
  .nav {
    gap: 6px;
  }
  .brand {
    font-size: 0.86rem;
  }
  .nav-cv,
  .switch {
    padding: 6px 10px;
  }
  .switch span {
    display: none;
  }
  .menu-toggle {
    width: 40px;
    height: 40px;
  }
}
/* Motion (only when the visitor has not asked for less) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hero-portrait,
  .pillar {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-copy > :nth-child(2) {
    animation-delay: 0.06s;
  }
  .hero-copy > :nth-child(3) {
    animation-delay: 0.12s;
  }
  .hero-copy > :nth-child(4) {
    animation-delay: 0.18s;
  }
  .hero-copy > :nth-child(5) {
    animation-delay: 0.24s;
  }
  .hero-copy > :nth-child(n + 6) {
    animation-delay: 0.3s;
  }
  .hero-portrait {
    animation-delay: 0.15s;
  }
  .pillar:nth-child(1) {
    animation-delay: 0.4s;
  }
  .pillar:nth-child(2) {
    animation-delay: 0.5s;
  }
  .hero-kicker .dot {
    animation: pulse 2.4s ease-out infinite;
  }
  .has-reveal .reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
  }
  .has-reveal .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 #7fe0b580;
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px #7fe0b500;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Interactive demos */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.certificate-card.no-image {
  justify-content: center;
  padding: 24px;
}
.certification-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.demo-shell {
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  border-radius: 12px;
  background: var(--soft);
}
.demo-tabs button,
.demo-mode button {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}
.demo-tabs button[aria-selected="true"],
.demo-mode button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.demo-tabs button:not([aria-selected="true"]):hover,
.demo-mode button:not([aria-pressed="true"]):hover:not(:disabled) {
  color: var(--ink);
  background: var(--surface);
}
.demo-mode button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.demo-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.demo-controls .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.demo-controls .demo-mode {
  margin-left: auto;
}
.demo-status {
  min-height: 1.6em;
  margin: 14px 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--ok);
}
.demo-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.demo-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.demo-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease;
}
.demo-row:disabled {
  cursor: default;
}
.demo-row:not(:disabled):hover {
  border-color: var(--accent);
  transform: translateX(3px);
}
.demo-row.is-active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.demo-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.demo-row code {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.demo-module {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}
.demo-badge {
  flex: none;
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}
.demo-badge.kind-pending,
.demo-badge.kind-none {
  color: var(--muted);
}
.demo-badge.kind-locator {
  color: var(--ok);
}
.demo-badge.kind-bug {
  color: var(--accent);
}
.demo-badge.kind-review {
  color: #b7791f;
}
:root[data-theme="dark"] .demo-badge.kind-review {
  color: #f2c566;
}
.demo-detail {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.demo-detail.is-empty {
  color: var(--muted);
}
.demo-detail h3 {
  margin: 12px 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.demo-detail p {
  color: var(--muted);
}
.demo-detail dl {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
}
.demo-detail dt {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
}
.demo-detail dd {
  margin: 0;
}
.demo-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.demo-sources li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 650;
}
.flow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.flow-step {
  display: grid;
  gap: 6px;
  justify-items: start;
  width: 100%;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  text-align: left;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background-color 0.18s ease;
}
.flow-step:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.flow-step.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.flow-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}
.flow-name {
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.3;
}
.flow-detail .skills {
  margin: 14px 0;
}
.demo-compare {
  margin-top: 18px;
}
.demo-compare .demo-status {
  color: var(--muted);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.95rem;
}
.demo-note {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
@media (max-width: 860px) {
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .demo-split {
    grid-template-columns: 1fr;
  }
  .demo-controls .demo-mode {
    margin-left: 0;
  }
}
@media (max-width: 520px) {
  .demo-tabs button {
    flex: 1 1 100%;
  }
  .demo-controls .btn {
    flex: 1 1 100%;
  }
  .demo-row {
    flex-direction: column;
  }
}
.nav-cv,
.switch,
.menu-toggle {
  flex: none;
}
.brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
