
:root {
  --ink: #111315;
  --paper: #edf6fc;
  --white: #ffffff;
  --quiet: #6d7073;
  --line: rgba(17, 19, 21, 0.14);
  --soft-line: rgba(17, 19, 21, 0.08);
  --max: 1280px;
  --side: clamp(22px, 5vw, 72px);
}

html.js-loading body { opacity: 0; }
html.js-ready body { opacity: 1; transition: opacity 180ms ease; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.load-error {
  width: min(100% - 40px, 760px);
  margin: 100px auto;
  padding: 30px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 28px;
  line-height: 1.6;
}

.mobile-nav { display: none; }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(178, 224, 255, .62), transparent 32%),
    radial-gradient(circle at 88% 78%, rgba(255, 184, 169, .48), transparent 34%),
    linear-gradient(145deg, #e7f5ff 0%, #f3f7fb 46%, #ffe4dc 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

::selection { background: #d7e8ff; color: #0d1117; }

.section-shell {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--side);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--soft-line);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(100%, var(--max));
  min-height: 72px;
  margin-inline: auto;
  padding-inline: var(--side);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.brand img { width: 31px; height: 31px; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  position: relative;
  padding-block: 25px;
  color: #6f7275;
  font-size: 13px;
  font-weight: 530;
  transition: color 180ms ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform 200ms ease;
}
.main-nav a.active::after { transform: scaleX(1); }

.language-toggle {
  justify-self: end;
  border: 0;
  background: transparent;
  color: #a0a2a4;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.language-toggle .selected { color: var(--ink); font-weight: 700; }

.hero { padding-top: clamp(70px, 9vw, 130px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  align-items: end;
  gap: clamp(48px, 8vw, 128px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  color: #64686b;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow > span { width: 32px; height: 1px; background: currentColor; }

.hero h1, .portfolio-hero h1 {
  max-width: 940px;
  margin: 0;
  font-size: clamp(50px, 7vw, 98px);
  font-weight: 510;
  letter-spacing: -.064em;
  line-height: .98;
}

.hero-intro {
  max-width: 740px;
  margin: 38px 0 0;
  color: #55595d;
  font-size: clamp(18px, 1.7vw, 23px);
  letter-spacing: -.02em;
  line-height: 1.55;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 19px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-dark {
  border-color: rgba(48,83,106,.46);
  background: linear-gradient(135deg, #315f7a 0%, #52758a 66%, #827878 135%);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(44,79,102,.18);
}
.button-dark:hover {
  border-color: rgba(46,78,99,.62);
  background: linear-gradient(135deg, #294f67 0%, #476a80 64%, #8c7774 135%);
  box-shadow: 0 16px 34px rgba(44,79,102,.24);
}
.button-quiet { border-color: rgba(50,79,96,.20); background: rgba(255,255,255,.54); box-shadow: 0 10px 24px rgba(61,82,91,.07); }
.button-quiet:hover { border-color: rgba(50,79,96,.30); background: rgba(255,255,255,.82); box-shadow: 0 14px 28px rgba(61,82,91,.10); }

.hero-signature {
  border: 1px solid rgba(17,19,21,.12);
  border-radius: 30px;
  padding: 26px;
  background: rgba(255,255,255,.58);
  box-shadow: 0 20px 55px rgba(49,62,55,.07);
  backdrop-filter: blur(12px);
}
.signature-top, .signature-bottom { display: flex; justify-content: space-between; align-items: center; }
.signature-top { margin-bottom: 32px; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.signature-top span:first-child {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 12px;
}
.hero-signature > p { margin: 0; font-size: clamp(29px, 3vw, 42px); font-weight: 350; letter-spacing: -.045em; line-height: 1.06; }
.signature-line { height: 1px; margin: 30px 0 16px; background: var(--line); }
.signature-bottom { color: #73777a; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(70px, 10vw, 140px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 18px 50px rgba(49,62,55,.055);
}
.signal-grid > div { padding: 27px 30px; }
.signal-grid > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
.signal-grid span { display: block; margin-bottom: 8px; color: #7b7e81; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.signal-grid strong { font-size: 17px; font-weight: 550; letter-spacing: -.025em; }

.value-section { padding-top: clamp(100px, 12vw, 165px); }
.value-heading {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
  margin-bottom: 48px;
}
.value-heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 470;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.value-heading-copy { padding-top: 5px; }
.value-heading-copy p:last-child {
  max-width: 700px;
  margin: 0;
  color: #5d6260;
  font-size: 18px;
  line-height: 1.7;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.value-card {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(17,19,21,.10);
  border-radius: 30px;
  background: rgba(255,255,255,.67);
  box-shadow: 0 18px 55px rgba(49,62,55,.055);
  backdrop-filter: blur(12px);
}
.value-card-number {
  margin-bottom: auto;
  color: #7b817e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}
.value-card h3 { margin: 48px 0 15px; font-size: 24px; font-weight: 550; letter-spacing: -.035em; }
.value-card p { margin: 0; color: #5f6461; font-size: 15px; line-height: 1.65; }

.projects-section { padding-top: clamp(100px, 13vw, 180px); padding-bottom: clamp(100px, 13vw, 180px); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 54px;
}
.section-heading h2, .profile-section h2, .contact-section h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 470;
  letter-spacing: -.055em;
  line-height: 1.02;
}
.text-link {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
  font-size: 12px;
  font-weight: 650;
}

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

.project-card {
  --project-gradient: linear-gradient(135deg, #eee, #ddd);
  --project-glow: #aaa;
  position: relative;
  min-height: 560px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr .8fr;
  border: 1px solid rgba(17,19,21,.12);
  border-radius: 36px;
  background: var(--project-gradient);
  box-shadow: 0 24px 70px rgba(49,62,55,.08);
  isolation: isolate;
}
.project-card-featured { grid-column: 1 / -1; min-height: 620px; grid-template-columns: .8fr 1.2fr; }
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgba(255,255,255,.58), transparent 54%);
}
.project-card-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 54px);
}
.project-card-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: rgba(17,19,21,.64);
  font-size: 9px;
  font-weight: 680;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.project-metric { color: var(--ink); }
.project-card h3 { margin: 0 0 17px; font-size: clamp(35px, 4vw, 61px); font-weight: 520; letter-spacing: -.055em; line-height: 1; overflow-wrap: anywhere; }
.project-card p { max-width: 550px; margin: 0; color: rgba(17,19,21,.68); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.project-link { display: flex; width: fit-content; gap: 24px; border-bottom: 1px solid var(--ink); padding-bottom: 7px; font-size: 11px; font-weight: 680; }
.project-card-visual { position: relative; min-width: 0; }
.visual-orbit { position: absolute; inset: 12% 7% 10%; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; transform: rotate(-14deg); }
.project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(50%, 240px);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(28,30,35,.14));
  transform: translate(-50%, -50%);
  transition: transform 420ms cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .project-logo { transform: translate(-53%, -54%) rotate(-3deg); }
.device-preview {
  position: absolute;
  right: -8%;
  bottom: -22%;
  width: min(44%, 245px);
  overflow: hidden;
  border: 5px solid #151719;
  border-radius: 26px;
  background: #151719;
  box-shadow: 0 30px 70px rgba(27,31,39,.24);
  transform: rotate(6deg);
  transition: transform 420ms cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .device-preview { transform: translateY(-8px) rotate(4deg); }
.device-preview img { width: 100%; }
.device-preview-landscape { right: -4%; bottom: 8%; width: min(62%, 330px); max-height: 58%; border-radius: 14px; }
.project-card[data-project="calculadora-per"] .device-preview,
.project-card[data-project="diccionario-rimas"] .device-preview {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.project-card[data-project="calculadora-per"] .device-preview img,
.project-card[data-project="diccionario-rimas"] .device-preview img {
  filter: drop-shadow(0 24px 32px rgba(34,48,55,.18));
}

.profile-section {
  width: min(calc(100% - 32px), 1248px);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(50px, 10vw, 160px);
  padding-top: clamp(85px, 10vw, 140px);
  padding-bottom: clamp(85px, 10vw, 140px);
  background: #151718;
  border-radius: 44px;
  color: #f7f7f3;
  box-shadow: 0 30px 85px rgba(20,24,22,.16);
}
.eyebrow-light { color: #a4a7a8; }
.profile-content > p { margin: 0 0 64px; color: #bec1c1; font-size: clamp(19px, 2vw, 25px); letter-spacing: -.02em; line-height: 1.55; }
.profile-content ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.18); }
.profile-content li { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.18); color: #f4f4ef; font-size: 13px; letter-spacing: .01em; }

.contact-section { padding-top: clamp(110px, 14vw, 190px); padding-bottom: clamp(110px, 14vw, 190px); }
.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(50px, 9vw, 140px); align-items: end; }
.contact-grid p { margin: 0 0 30px; color: #686c6f; font-size: 17px; line-height: 1.65; }

.site-footer { border-top: 1px solid var(--line); border-radius: 40px 40px 0 0; background: linear-gradient(120deg, rgba(225,242,255,.94), rgba(255,226,219,.94)); }
.footer-inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding: 46px var(--side) 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 45px;
  align-items: start;
}
.footer-name { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.footer-role, .footer-copy { margin: 0; color: #7e8183; font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 28px; font-size: 12px; }
.footer-links a { border-bottom: 1px solid transparent; padding-bottom: 3px; }
.footer-links a:hover { border-color: var(--ink); }
.footer-copy { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); }

.portfolio-page { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(110px, 14vw, 180px); }
.portfolio-hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(50px, 10vw, 160px); align-items: end; margin-bottom: clamp(70px, 9vw, 120px); }
.portfolio-hero h1 { font-size: clamp(54px, 7vw, 95px); }
.portfolio-intro { padding: 30px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.60); }
.portfolio-intro p { margin: 0 0 36px; color: #616568; font-size: 17px; line-height: 1.62; }
.portfolio-intro span { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.portfolio-principles { margin-bottom: clamp(70px, 9vw, 110px); }
.portfolio-principles-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 32px; }
.portfolio-principles-head h2 { max-width: 720px; margin: 0; font-size: clamp(36px, 4vw, 56px); font-weight: 480; letter-spacing: -.05em; line-height: 1.04; }
.portfolio-principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.portfolio-principle { padding: 28px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.62); }
.portfolio-principle h3 { margin: 0 0 14px; font-size: 21px; font-weight: 560; letter-spacing: -.03em; }
.portfolio-principle p { margin: 0; color: #606562; font-size: 14px; line-height: 1.65; }
.portfolio-grid .project-card:nth-child(4), .portfolio-grid .project-card:nth-child(7) { grid-column: 1 / -1; }

.project-page { padding-top: 34px; }
.project-hero {
  --project-gradient: linear-gradient(135deg, #eee, #ddd);
  position: relative;
  min-height: 690px;
  overflow: hidden;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  background: var(--project-gradient);
  border-radius: 44px;
  box-shadow: 0 25px 75px rgba(49,62,55,.09);
}
.project-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.56), transparent 54%); }
.project-hero-copy { position: relative; z-index: 2; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-top: 75px; padding-bottom: 75px; }
.back-link { position: absolute; top: 34px; left: var(--side); font-size: 11px; font-weight: 650; }
.project-hero h1 { margin: 0; font-size: clamp(58px, 8vw, 112px); font-weight: 510; letter-spacing: -.065em; line-height: .92; }
.project-lead { width: 100%; max-width: 620px; margin: 34px 0 0; color: rgba(17,19,21,.69); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.55; overflow-wrap: anywhere; }
.project-actions { margin-top: 35px; }
.project-hero-visual { position: relative; z-index: 1; min-width: 0; }
.detail-logo { position: absolute; top: 50%; left: 50%; width: min(42%, 270px); max-height: 270px; object-fit: contain; filter: drop-shadow(0 28px 38px rgba(25,28,34,.14)); transform: translate(-50%,-50%); }
.detail-device { position: absolute; width: min(36%, 230px); overflow: hidden; border: 6px solid #111315; border-radius: 28px; background: #111315; box-shadow: 0 34px 72px rgba(25,29,36,.28); }
.detail-device-1 { right: -2%; bottom: -12%; transform: rotate(6deg); }
.detail-device-2 { right: 18%; top: -18%; transform: rotate(-5deg); }
.detail-device-wide { width: min(58%, 390px); border-radius: 15px; }
.detail-device-wide.detail-device-1 { right: -3%; bottom: 8%; }
.detail-device-wide.detail-device-2 { top: -8%; right: 13%; width: min(32%, 240px); }
body[data-project="calculadora-per"] .detail-device,
body[data-project="diccionario-rimas"] .detail-device {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-project="calculadora-per"] .detail-device img,
body[data-project="diccionario-rimas"] .detail-device img {
  filter: drop-shadow(0 28px 38px rgba(34,48,55,.18));
}

.project-summary { display: grid; grid-template-columns: 100px 1fr .4fr; gap: 40px; align-items: start; margin-top: 20px; padding-top: 38px; padding-bottom: 38px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.60); }
.summary-index { font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.summary-label { margin: 0 0 11px; color: #75797c; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.summary-copy { max-width: 650px; margin: 0; font-size: 18px; letter-spacing: -.015em; line-height: 1.55; }
.summary-metric span { display: block; margin-bottom: 11px; color: #777b7e; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.summary-metric strong { font-size: 14px; font-weight: 600; }

.project-body { display: grid; grid-template-columns: 270px 1fr; gap: clamp(70px, 10vw, 150px); padding-top: clamp(90px, 12vw, 155px); padding-bottom: clamp(110px, 13vw, 180px); }
.tech-aside { position: sticky; top: 115px; align-self: start; padding: 24px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,255,.58); }
.tech-aside > span { display: block; margin-bottom: 22px; color: #75797c; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tech-aside ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.tech-aside li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.project-sections { max-width: 790px; }
.project-sections article { padding: clamp(28px, 4vw, 52px); border: 1px solid var(--line); border-radius: 32px; background: rgba(255,255,255,.58); }
.project-sections article + article { margin-top: 22px; }
.section-number { display: block; margin-bottom: 34px; color: #818486; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.project-sections h2 { max-width: 700px; margin: 0 0 32px; font-size: clamp(37px, 4.5vw, 62px); font-weight: 480; letter-spacing: -.05em; line-height: 1.02; }
.project-sections p { margin: 0 0 22px; color: #575b5e; font-size: 18px; line-height: 1.72; }

.next-project {
  --next-gradient: #dbe7ef;
  position: relative;
  isolation: isolate;
  min-height: 220px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 42px;
  background: var(--next-gradient);
  border-top: 1px solid var(--line);
  border-radius: 42px 42px 0 0;
  color: #14202a;
}
.next-project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, rgba(255,255,255,.18), transparent 58%);
  pointer-events: none;
}
.next-project > * { position: relative; z-index: 1; }
.next-project > span:first-child {
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(28,52,68,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 10px 25px rgba(38,59,72,.08);
  color: #14202a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.next-project strong {
  min-width: 0;
  padding: 13px 20px 15px;
  border: 1px solid rgba(28,52,68,.14);
  border-radius: 24px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 12px 30px rgba(38,59,72,.09);
  color: #14202a;
  font-size: clamp(35px, 5vw, 66px);
  font-weight: 480;
  letter-spacing: -.05em;
  line-height: 1;
  overflow-wrap: anywhere;
  backdrop-filter: blur(10px);
}
.next-project > span:last-child {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(38,72,94,.22);
  border-radius: 50%;
  background: rgba(207,231,245,.72);
  font-size: 26px;
}

@media (prefers-color-scheme: dark) {
  .next-project::before { background: linear-gradient(110deg, rgba(7,15,20,.12), transparent 58%); }
  .next-project > span:first-child,
  .next-project strong {
    border-color: rgba(255,255,255,.18);
    background: rgba(15,25,32,.82);
    color: #f5f8fa;
    box-shadow: 0 12px 30px rgba(0,0,0,.20);
  }
  .next-project > span:last-child { border-color: rgba(255,255,255,.18); background: rgba(15,25,32,.78); color: #f5f8fa; }
}

@media (max-width: 920px) {
  body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .header-inner { grid-template-columns: 1fr auto; }
  .main-nav { display: none; }
  .mobile-nav {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 90;
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 0;
    border-top: 1px solid rgba(255,255,255,.15);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(20,22,23,.94);
    color: white;
    box-shadow: 0 -12px 40px rgba(0,0,0,.18);
    backdrop-filter: blur(16px);
  }
  .mobile-nav a {
    display: grid;
    min-height: 54px;
    place-items: center;
    font-size: 11px;
  }
  .mobile-nav a + a { border-left: 1px solid rgba(255,255,255,.16); }
  .site-footer { padding-bottom: 0; }
  .hero-grid, .portfolio-hero, .project-hero, .profile-section, .contact-grid { grid-template-columns: 1fr; }
  .value-heading { grid-template-columns: 1fr; }
  .value-grid, .portfolio-principles-grid { grid-template-columns: 1fr; }
  .value-card { min-height: 245px; }
  .hero-signature { max-width: 460px; margin-top: 15px; }
  .featured-projects, .portfolio-grid { grid-template-columns: 1fr; }
  .project-card, .project-card-featured { grid-column: auto; min-height: 580px; grid-template-columns: 1fr .8fr; }
  .portfolio-grid .project-card:nth-child(4), .portfolio-grid .project-card:nth-child(7) { grid-column: auto; }
  .profile-section { gap: 70px; }
  .project-hero { min-height: 980px; }
  .project-hero-copy { min-height: 500px; padding-bottom: 45px; }
  .project-hero-visual { min-height: 480px; }
  .project-summary { grid-template-columns: 70px 1fr; }
  .summary-metric { grid-column: 2; }
  .project-body { grid-template-columns: 1fr; }
  .tech-aside { position: static; }
}

@media (max-width: 640px) {
  :root { --side: 20px; }
  .header-inner { min-height: 64px; }
  .brand span { font-size: 13px; }
  .hero { padding-top: 64px; }
  .hero h1, .portfolio-hero h1 { font-size: clamp(46px, 14vw, 67px); letter-spacing: -.058em; }
  .hero-intro { margin-top: 28px; font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; justify-content: space-between; }
  .signal-grid { grid-template-columns: 1fr; }
  .signal-grid > div { padding: 18px 22px; }
  .signal-grid > div + div { border-top: 1px solid var(--line); border-left: 0; padding-left: 22px; }
  .value-heading h2 { font-size: 43px; }
  .value-card { min-height: 220px; border-radius: 26px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading h2, .profile-section h2, .contact-section h2 { font-size: 43px; }
  .project-card, .project-card-featured { min-height: 680px; grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .project-card-copy { min-height: 360px; }
  .project-card-visual { min-height: 320px; }
  .project-card h3 { font-size: 41px; }
  .project-card[data-project="microexpression-trainer"] h3 { font-size: clamp(31px, 9vw, 37px); letter-spacing: -.045em; }
  .project-card-topline { flex-direction: column; }
  .project-logo { width: min(44%, 170px); }
  .device-preview { right: 2%; bottom: -25%; width: min(40%, 175px); }
  .device-preview-landscape { bottom: 12%; width: min(58%, 260px); }
  .profile-section { width: calc(100% - 16px); border-radius: 30px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: start; gap: 20px; }
  .footer-copy { grid-column: auto; }
  .portfolio-hero { margin-bottom: 60px; }
  .portfolio-intro { padding: 24px; border-radius: 24px; }
  .portfolio-principles-head { align-items: start; flex-direction: column; }
  .portfolio-principle { border-radius: 24px; }
  .project-page { padding-top: 8px; }
  .project-hero { min-height: 870px; padding-inline: 20px; border-radius: 30px; }
  .project-hero-copy { min-height: 470px; padding-top: 90px; }
  .back-link { left: 20px; }
  .project-hero h1 { font-size: clamp(52px, 17vw, 76px); }
  body[data-project="microexpression-trainer"] .project-hero h1 { font-size: clamp(40px, 11.5vw, 54px); letter-spacing: -.05em; overflow-wrap: anywhere; }
  .project-lead { font-size: 17px; }
  .project-hero-visual { min-height: 390px; }
  .detail-logo { width: min(44%, 180px); }
  .detail-device { width: min(38%, 165px); border-width: 4px; border-radius: 20px; }
  .detail-device-2 { right: 23%; top: -6%; }
  .project-summary { grid-template-columns: 45px 1fr; gap: 18px; }
  .project-summary { border-radius: 24px; }
  .project-body { gap: 70px; }
  .project-sections p { font-size: 17px; }
  .project-sections article { padding: 26px; border-radius: 26px; }
  .next-project { grid-template-columns: 1fr auto; min-height: 190px; }
  .next-project > span:first-child { grid-column: 1 / -1; align-self: end; }
  .next-project strong { padding: 11px 15px 13px; border-radius: 20px; align-self: start; }
  .next-project > span:last-child { width: 46px; height: 46px; align-self: start; font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
