﻿:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --paper: #fffdf8;
  --text: #20201d;
  --muted: #6f6b63;
  --line: #ded8cc;
  --soft: #eee8dc;
  --accent: #5f725c;
  --accent-2: #a1603a;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111210;
  --paper: #181a17;
  --text: #f2eee6;
  --muted: #b8b0a2;
  --line: #33362f;
  --soft: #20231f;
  --accent: #9fc59a;
  --accent-2: #e0a36d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 10px;
}

body {
  background:
    linear-gradient(90deg, var(--bg) 0, color-mix(in srgb, var(--bg) 72%, transparent) 52%, color-mix(in srgb, var(--bg) 45%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 18%, transparent) 0, var(--bg) 760px),
    url("../img/hero.jpg") top center / min(1600px, 150vw) auto no-repeat,
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  margin: 0;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

a:hover,
button:hover {
  color: var(--accent-2);
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.site-header {
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px max(20px, calc((100vw - 1040px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
}

nav,
.quick-links,
.social-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

nav {
  color: var(--muted);
  font-size: 0.95rem;
}

.quick-links a,
.quick-links button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
}

.icon-button,
.lang-toggle {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.icon-button svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.lang-toggle {
  color: var(--muted);
  font-weight: 800;
}

.page-shell {
  margin: 0 auto;
  max-width: 1040px;
  padding: 52px 20px 44px;
  transition: max-width 180ms ease, box-shadow 180ms ease;
}

.section,
#inicio {
  scroll-margin-top: 10px;
}

:root[data-device="mobile"] .page-shell {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  box-shadow: 0 22px 80px rgb(0 0 0 / 12%);
  max-width: 430px;
}

:root[data-device="mobile"] .resume-item,
:root[data-device="mobile"] .project-card,
:root[data-device="mobile"] .metrics,
:root[data-device="mobile"] .hero-splash {
  grid-template-columns: 1fr;
}

:root[data-device="mobile"] .logo-tile,
:root[data-device="mobile"] .project-thumb {
  max-width: 100%;
}

.profile {
  min-height: 620px;
  padding: 96px 0 64px;
}

.hero-splash {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: 320px minmax(0, 1fr);
}

.profile-photo {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: auto;
  object-fit: cover;
  object-position: center top;
  width: 320px;
}

.hero-copy {
  min-width: 0;
}

.logo-tile,
.project-thumb {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  display: flex;
  font-weight: 900;
  justify-content: center;
}

.project-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.eyebrow,
.item-meta,
.tags {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 18px;
}

.title-underline {
  background: var(--accent-2);
  grid-column: 1 / -1;
  height: 3px;
  margin: 0 0 4px;
  width: min(220px, 45vw);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.lead,
.summary p {
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  max-width: 760px;
}

.quick-links {
  margin-top: 24px;
}

.hero-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  margin-top: 28px;
}

.hero-links a,
.hero-links button,
.hero-links span {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 10px;
  font-size: 1.08rem;
}

.hero-links a,
.hero-links button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
}

.hero-links svg,
.site-footer svg {
  fill: currentColor;
  height: 24px;
  width: 24px;
}

.private-repo-card {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 24px;
  max-width: 680px;
  padding: 18px;
}

.private-repo-card svg {
  fill: currentColor;
  height: 52px;
  width: 52px;
}

.private-repo-card strong,
.private-repo-card small,
.private-repo-card em {
  display: block;
}

.private-repo-card small {
  color: var(--muted);
  margin-top: 4px;
}

.private-repo-card em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 800;
}


.social-links {
  color: var(--muted);
  margin-top: 16px;
}

.summary,
.section,
.metrics {
  border-top: 1px solid var(--line);
  padding: 42px 0;
}

.metrics {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics article {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px;
}

.metrics strong {
  color: var(--accent-2);
  display: block;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
}

.resume-item,
.project-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 20px;
  grid-template-columns: 220px minmax(0, 1fr);
  margin-top: 18px;
  padding: 20px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.resume-item:hover,
.project-card:hover {
  border-color: var(--accent-2);
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
  transform: translateY(-3px);
}

.resume-item img {
  aspect-ratio: 1;
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.work-photo {
  display: block;
  position: relative;
  align-self: start;
  overflow: hidden;
  border-radius: 8px;
}

.work-photo::after {
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / 72%));
  border-radius: 8px;
  content: "";
  inset: 0;
  position: absolute;
}

.work-photo span {
  bottom: 12px;
  color: white;
  font-weight: 900;
  left: 12px;
  position: absolute;
  right: 12px;
  z-index: 1;
}

.logo-tile,
.project-thumb {
  aspect-ratio: 16 / 10;
  font-size: 2rem;
}

.resume-item ul {
  color: var(--muted);
  margin: 18px 0;
  padding-left: 20px;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-actions {
  display: flex;
  justify-content: flex-end;
}

.project-actions a {
  background: var(--text);
  border-radius: 12px;
  color: var(--bg);
  font-weight: 800;
  padding: 10px 14px;
}

.project-actions a::after {
  content: " \2197";
}

.tags {
  word-spacing: 8px;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.education-track {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  position: relative;
}

.education-track::before {
  background: var(--line);
  bottom: 18px;
  content: "";
  left: 42px;
  position: absolute;
  top: 18px;
  width: 1px;
}

.education-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--paper) 92%, transparent), color-mix(in srgb, var(--soft) 78%, transparent));
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 20px;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  padding: 22px;
  position: relative;
  transition: border-color 160ms ease, transform 160ms ease;
}

.education-card:hover,
.education-card:focus-visible {
  border-color: var(--accent-2);
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
  outline: 0;
  transform: translateY(-3px);
}

.education-card:hover .education-number,
.education-card:focus-visible .education-number {
  background: var(--accent-2);
  color: var(--bg);
}

.education-number {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--accent-2);
  border-radius: 999px;
  color: var(--accent-2);
  display: flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  position: relative;
  width: 42px;
  z-index: 1;
}

.education-card > strong {
  align-self: start;
  color: var(--accent);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.skill-cloud span {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  padding: 9px 12px;
}

.skill-cloud img {
  height: 22px;
  width: 22px;
}

.quick-links svg {
  fill: currentColor;
  height: 20px;
  width: 20px;
}

.contact {
  padding-bottom: 28px;
}

.search-dialog,
.education-dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  max-width: 560px;
  padding: 24px;
  width: calc(100% - 32px);
}

.search-dialog::backdrop,
.education-dialog::backdrop {
  background: rgb(0 0 0 / 45%);
}

.dialog-close {
  color: var(--muted);
  float: right;
}

.search-dialog label,
.search-dialog input {
  display: block;
  width: 100%;
}

.search-dialog input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  margin-top: 10px;
  padding: 12px;
}

.search-help {
  color: var(--muted);
  margin-bottom: 0;
}

.education-dialog h2 {
  margin: 10px 0;
}

.education-detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0;
}

.education-detail-grid span {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.education-detail-grid strong,
.education-detail-grid small {
  display: block;
}

.education-detail-grid small {
  color: var(--muted);
}

.course-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.course-list:empty {
  display: none;
}

.course-list article {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.course-list small {
  color: var(--accent-2);
  grid-column: 1 / -1;
}

.resume-item img.company-logo {
  background: white;
  object-fit: contain;
  padding: 16px;
}

.hero-links .mobility-line {
  color: var(--muted);
  gap: 24px;
}

.hero-links .mobility-line > span {
  align-items: center;
  display: inline-flex;
  font-size: inherit;
  gap: 7px;
}

.hero-links .mobility-line svg {
  color: var(--accent-2);
  height: 18px;
  width: 18px;
}

.skill-groups {
  display: grid;
  gap: 26px;
}

.skill-group h3 {
  color: var(--accent-2);
  font-size: 1rem;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.course-certificate {
  align-items: center;
  color: var(--accent-2);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 500;
  gap: 7px;
  grid-column: 1 / -1;
  width: fit-content;
}

.course-certificate svg {
  fill: currentColor;
  height: 16px;
  width: 16px;
}

.contact-link-group + .contact-link-group {
  margin-top: 24px;
}

.contact-link-group h3 {
  color: var(--accent-2);
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.contact-link-group .quick-links {
  margin-top: 0;
}

.toast {
  background: var(--text);
  border-radius: 999px;
  bottom: 28px;
  color: var(--bg);
  left: 50%;
  opacity: 0;
  padding: 10px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 20px);
  transition: 180ms ease;
  z-index: 40;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.to-top {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  bottom: 22px;
  color: var(--bg);
  display: flex;
  font-size: 1.7rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  position: fixed;
  right: 22px;
  width: 52px;
  z-index: 30;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1040px;
  padding: 28px 20px 42px;
}

.site-footer > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-icons {
  gap: 18px;
}

.footer-icons button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.is-hidden {
  display: none;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
    position: static;
  }

  .resume-item,
  .project-card,
  .metrics,
  .hero-splash,
  .education-card {
    grid-template-columns: 1fr;
  }

  .education-card {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
  }

  .education-card > strong {
    grid-area: 1 / 2;
    align-self: center;
  }

  .education-card > div {
    grid-column: 1 / -1;
  }

  .education-track::before {
    display: none;
  }

  .profile {
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .profile-photo {
    max-height: 360px;
    width: 100%;
  }

  .logo-tile,
  .project-thumb {
    max-width: 120px;
  }

  .project-thumb {
    max-width: 100%;
  }
}

.dialog-fallback {
  inset: 20vh auto auto 50%;
  position: fixed;
  transform: translateX(-50%);
  z-index: 20;
}
/* Portfolio polish */
.site-header {
  background: transparent;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  left: 50%;
  max-width: 1040px;
  padding: 0 20px;
  position: fixed;
  top: 22px;
  transform: translateX(-50%);
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
  width: calc(100% - 32px);
}

.site-header.at-top {
  background: transparent;
  box-shadow: none;
}

.site-header.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -135%);
}

.page-shell {
  padding-top: 118px;
}

.project-thumb {
  position: relative;
}

.project-actions {
  bottom: 8px;
  position: absolute;
  right: 8px;
  z-index: 1;
}

.project-actions a {
  background: rgb(0 0 0 / 78%);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 8px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.project-actions a:hover,
.project-actions a:focus-visible {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--bg);
  outline: 0;
  transform: translateY(-1px);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  word-spacing: normal;
}

.tags span {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 5px 8px;
}

.tags span:nth-child(3n + 2) {
  background: color-mix(in srgb, var(--accent-2) 13%, transparent);
  border-color: color-mix(in srgb, var(--accent-2) 28%, transparent);
  color: var(--accent-2);
}

.tags span:nth-child(3n) {
  background: color-mix(in srgb, #4f8cff 13%, transparent);
  border-color: color-mix(in srgb, #4f8cff 28%, transparent);
  color: #78a8ff;
}

@media (max-width: 760px) {
  .site-header,
  .site-header.at-top {
    border-radius: 0;
    left: 0;
    max-width: none;
    transform: none;
    width: 100%;
  }

  .site-header.is-hidden {
    transform: translateY(-135%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .project-actions a {
    transition: none;
  }
}

.project-card {
  cursor: pointer;
}

.project-card:focus-visible {
  border-color: var(--accent-2);
  box-shadow: 0 18px 50px rgb(0 0 0 / 18%);
  outline: 0;
}

.project-dialog h2 {
  margin: 10px 0;
}

.project-dialog [data-project-grade] {
  color: var(--accent-2);
}
.project-dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  max-width: 620px;
  padding: 24px;
  width: calc(100% - 32px);
}

.project-dialog::backdrop {
  background: rgb(0 0 0 / 45%);
}


/* Header and scroll reveal trial */
.site-header,
.site-header.at-top {
  background: transparent;
  backdrop-filter: none;
  border: 0;
  box-shadow: none;
  left: 50%;
  max-width: 1040px;
  padding: 0 20px;
  position: fixed;
  top: 22px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
}

.site-header.is-hidden {
  transform: translate(-50%, -135%);
}

.page-shell {
  padding-top: 96px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 220ms ease-out, transform 220ms cubic-bezier(.18,.9,.2,1);
}

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

@media (max-width: 760px) {
  .site-header,
  .site-header.at-top {
    left: 0;
    padding: 14px 16px;
    position: fixed;
    top: 0;
    transform: none;
    width: 100%;
  }

  .site-header.is-hidden {
    transform: translateY(-135%);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* Header pill restore */
.site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  box-shadow: 0 18px 60px rgb(0 0 0 / 18%);
  padding: 12px 18px;
  top: 14px;
}

.site-header.at-top {
  background: transparent;
  backdrop-filter: none;
  border-color: transparent;
  box-shadow: none;
}

.project-actions a::after {
  content: " \2197";
}

@media (max-width: 760px) {
  .site-header {
    border-radius: 0;
    padding: 14px 16px;
    top: 0;
  }
}


/* Stable to-top hover */
.to-top:hover,
.to-top:focus-visible {
  background: var(--accent);
  color: var(--bg);
}


/* Skill hover polish */
.skill-cloud span {
  cursor: default;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.skill-cloud span:hover {
  background: color-mix(in srgb, var(--accent-2) 12%, var(--paper));
  border-color: var(--accent-2);
  box-shadow: 0 10px 26px rgb(0 0 0 / 14%);
  color: var(--text);
  transform: translateY(-2px);
}

.skill-cloud span:hover img {
  transform: scale(1.08);
}

.skill-cloud img {
  transition: transform 160ms ease;
}


/* Smooth header top transition */
.site-header {
  transition:
    background-color 420ms ease,
    backdrop-filter 420ms ease,
    border-color 420ms ease,
    box-shadow 420ms ease,
    opacity 180ms ease,
    top 420ms cubic-bezier(.2,.8,.2,1),
    transform 420ms cubic-bezier(.2,.8,.2,1);
}

.site-header.at-top {
  transform: translateX(-50%) translateY(-4px);
}

.site-header:not(.at-top) {
  transform: translateX(-50%) translateY(0);
}

.site-header.is-hidden {
  transform: translate(-50%, -135%);
}

@media (max-width: 760px) {
  .site-header.at-top,
  .site-header:not(.at-top) {
    transform: translateY(0);
  }

  .site-header.is-hidden {
    transform: translateY(-135%);
  }
}

/* New recommendation content follows the original portfolio palette and cards. */
.recommendation-card{background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:28px;display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:28px}
.reference-company{color:var(--accent);font-weight:900;letter-spacing:.12em}
.recommendation-card blockquote{margin:20px 0;border-left:3px solid var(--accent-2);padding-left:20px;font-size:1.3rem;line-height:1.5}
.reference-author{font-weight:800;margin-bottom:4px}
.reference-actions{display:flex;flex-direction:column;justify-content:center;gap:14px}
.reference-actions a{border:1px solid var(--line);border-radius:999px;padding:10px 16px;text-align:center}
.reference-actions .primary-cta{color:var(--accent-2);border-color:var(--accent-2)}
.text-link{color:var(--accent-2)}
.product-stack{margin:16px 0;color:var(--muted)}
.product-stack summary{cursor:pointer;color:var(--text)}
.experience-context,.skills-context{color:var(--muted)}
.skip-link{position:fixed;top:-100px;left:20px;z-index:100;background:var(--paper);padding:12px 18px}
.skip-link:focus{top:12px}
:focus-visible{outline:2px solid var(--accent-2);outline-offset:4px}
@media(max-width:760px){.recommendation-card{grid-template-columns:1fr;padding:20px}.reference-actions{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

.hero-name{font-size:clamp(2.4rem,5vw,3.6rem);line-height:1.1;margin-bottom:14px;letter-spacing:-.035em}
.hero-role{font-size:clamp(1rem,2vw,1.2rem);line-height:1.6;font-weight:700;color:var(--accent);margin-bottom:20px}

.resume-item .booka-photo img.company-logo{aspect-ratio:1;background:white;padding:24px;object-fit:contain}.ai-focus{color:var(--muted);font-size:.95rem}

.booka-details-button{margin-top:18px;border:1px solid var(--accent-2);border-radius:999px;padding:10px 16px;color:var(--accent-2)}.booka-details-button:hover{background:var(--soft)}.booka-dialog{max-height:85vh;overflow:auto}.booka-dialog ul{color:var(--muted);padding-left:22px}.booka-dialog .tags{margin:16px 0}

.booka-card{cursor:pointer}.booka-letter-link{margin-top:12px}.booka-letter-link a{display:inline-block;padding:6px 0}

.booka-stack-box{margin-top:20px;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--soft)}.booka-stack-box .tags{margin:0}
.tags.booka-stack-box{margin:20px 0 0;padding:0;border:0;border-radius:0;background:none}
.booka-card .experience-context{margin-top:16px}.reference-actions a{display:flex;align-items:center;justify-content:center;gap:8px}.reference-actions svg{fill:currentColor;width:20px;height:20px;flex-shrink:0}

/* Recommendation emphasis uses the existing palette. */
.recommendation-card{border-top:4px solid var(--accent-2);box-shadow:0 12px 36px rgb(0 0 0 / 7%);background:linear-gradient(135deg,var(--paper),var(--soft));gap:36px;padding:32px}
.recommendation-card [data-i18n="referenceIntro"]{font-weight:700;color:var(--accent-2);margin-top:12px}
.recommendation-card blockquote{font-size:clamp(1.3rem,2.6vw,1.75rem);font-weight:650;line-height:1.5}
.reference-actions .primary-cta{background:var(--accent-2);color:var(--paper);font-weight:750;min-height:52px}
.reference-actions .primary-cta:hover{background:var(--text);border-color:var(--text);color:var(--bg)}
@media(max-width:760px){.recommendation-card{padding:22px;gap:22px}.reference-actions{align-items:stretch}.reference-actions a{width:100%}.hero-links .mobility-line{flex-wrap:wrap;gap:12px}.site-header nav{gap:10px}.site-header .brand{white-space:nowrap}}

/* Keep work details in their own row below the wrapping skill tags. */
.work-case-actions {
  display: flex;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.work-case-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 10px 14px 10px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--paper));
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.work-case-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, var(--paper));
  color: var(--accent);
}
.work-case-button:hover {
  background: color-mix(in srgb, var(--accent) 15%, var(--paper));
  border-color: var(--accent);
}
.work-case-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 600px) {
  .work-case-button { width: 100%; }
  }
@media (prefers-reduced-motion: reduce) { .work-case-button { transition: none; } }

/* A readable work story with its own header, sections and reference. */
.work-case-dialog {
  width: min(820px, calc(100% - 32px));
  max-width: 820px;
  max-height: 88vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 28px 100px rgb(0 0 0 / 30%);
}
.work-case-dialog::backdrop { background: rgb(0 0 0 / 60%); backdrop-filter: blur(5px); }
.case-toolbar {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 28px; background: var(--paper); border-bottom: 1px solid var(--line);
  font-size: .7rem; font-weight: 750; letter-spacing: .14em; color: var(--muted);
}
.case-toolbar form { margin: 0; }
.case-toolbar .case-close {
  position: static; display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--soft); color: var(--text);
}
.case-hero {
  padding: 32px 36px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--paper)), var(--paper));
  border-bottom: 1px solid var(--line);
}
.case-company { font-size: .8rem; letter-spacing: .17em; font-weight: 800; color: var(--accent); }
.work-case-dialog .case-hero h2 { margin: 12px 0 20px; max-width: 650px; font-size: clamp(1.6rem, 4vw, 2.25rem); line-height: 1.2; letter-spacing: -.04em; }
.case-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.case-tools span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .75rem; }
.case-story { display: grid; gap: 16px; padding: 28px; }
.case-block { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; }
.case-number { padding-top: 3px; font: 700 .8rem ui-monospace, monospace; color: var(--accent); }
.case-block h3 { margin: 0 0 10px; font-size: 1rem; line-height: 1.4; }
.case-block p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.8; }
.case-solution { background: color-mix(in srgb, var(--accent) 7%, var(--paper)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.case-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 36px; border-top: 1px solid var(--line); background: var(--soft); }
.case-footer span { color: var(--muted); font-size: .7rem; letter-spacing: .1em; font-weight: 750; }
.case-footer a { color: var(--accent); font-size: .9rem; font-weight: 700; text-underline-offset: 4px; }
@media(max-width:600px) {
  .work-case-dialog { width: calc(100% - 20px); max-height: 90vh; border-radius: 14px; }
  .case-toolbar { padding: 10px 16px; }
  .case-hero { padding: 24px 20px; }
  .case-story { padding: 16px; gap: 12px; }
  .case-block { grid-template-columns: 24px minmax(0,1fr); gap: 10px; padding: 16px; }
  .case-footer { padding: 18px 20px; }
}

/* A compact, consistent caption strip for every company image. */
.work-photo::after {
  inset: auto 0 0;
  height: 44px;
  border-radius: 0 0 8px 8px;
  background: rgb(38 42 44 / 82%);
}
.work-photo span {
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: #fff;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.35;
}
.resume-item .booka-photo img.company-logo { padding-bottom: 54px; }

.booka-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 18px;
}
.booka-actions .booka-details-button,
.booka-actions .booka-letter-link { margin-top: 0; }
.booka-actions .booka-details-button { flex: 0 0 auto; }
.booka-actions .booka-letter-link { min-width: 0; }

/* Stretch only the logo panel; its row ends with the skills, before the case action. */
.booka-card { row-gap: 0; }
.booka-card .booka-photo { align-self: stretch; }
.booka-card .booka-photo img.company-logo {
  height: 100%;
  min-height: 220px;
  aspect-ratio: auto;
  object-fit: contain;
}
.booka-card .booka-case-actions { grid-column: 2; }
@media (max-width: 820px) {
  .booka-card .booka-case-actions { grid-column: 1 / -1; }
}
:root[data-device="mobile"] .booka-card .booka-case-actions { grid-column: 1 / -1; }

.header-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
@media(max-width:760px) {
  .site-header { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 10px 16px; }
  .site-header .brand { grid-column: 1; grid-row: 1; font-size: 1rem; }
  .header-controls { grid-column: 2; grid-row: 1; gap: 6px; }
  .header-controls .icon-button, .header-controls .terminal-launch { width: 32px; height: 32px; min-width: 32px; padding: 5px; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; display:flex; width:100%; min-width:0; flex-wrap:nowrap; overflow-x:auto; gap:16px; padding:4px 0; }
  .site-header nav a { flex-shrink:0; white-space:nowrap; font-size:.8rem; }
}
