:root {
  /* Colors — backgrounds */
  --cream-bg:       #F4EFE6;
  --cream-surface:  #FFFFFF;
  --cream-border:   #E2D9CE;
  --cream-hover:    #EDE8E0;

  /* Colors — navy */
  --navy-900:       #1B3A6B;
  --navy-700:       #2E5FA3;
  --navy-200:       #DDEAF6;
  --navy-100:       #EEF4FB;

  /* Colors — text */
  --text-primary:   #1C1714;
  --text-muted:     #7A7067;
  --text-inverse:   #F4EFE6;

  /* Accent */
  --accent-metric:  #C4622D;

  /* Shadows */
  --shadow-window:  0 4px 24px rgba(27, 58, 107, 0.10), 0 1px 4px rgba(27, 58, 107, 0.06);
  --shadow-hover:   0 8px 40px rgba(27, 58, 107, 0.16), 0 2px 8px rgba(27, 58, 107, 0.08);

  /* Typography */
  --font-display:   'Fraunces', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;
  --font-mono:      'Fragment Mono', 'Courier New', monospace;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.5rem;
  --text-2xl:   2rem;
  --text-3xl:   clamp(2rem, 4vw + 1rem, 3rem);
  --text-4xl:   clamp(2.5rem, 6vw + 1rem, 4.5rem);
  --text-5xl:   clamp(3rem, 9vw + 1rem, 7rem);

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2.5rem;
  --space-2xl:  4rem;
  --space-3xl:  6rem;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --window-radius: 12px;

  /* Layout */
  --max-width:  1200px;
  --window-chrome-height: 40px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--cream-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================== */
/* OS VIEWPORT · Single browser mockup */
/* ============================== */
@media (min-width: 1024px) {
  html, body { height: 100%; overflow: hidden; }
  body { padding-top: 0; }

  .os-viewport {
    height: 100vh;
    width: 100vw;
    padding: 12px;
    background: var(--cream-bg);
  }

  .os-window-app {
    height: 100%;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    display: grid;
    grid-template-rows: 42px 1fr;
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    box-shadow: 0 12px 40px rgba(27,58,107,0.12), 0 2px 6px rgba(27,58,107,0.06);
    transform: none !important;
  }

  .window-chrome-app {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 0 14px;
    background: var(--cream-hover);
    border-bottom: 1px solid var(--cream-border);
  }
  .window-chrome-app .window-title {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
  }
  .window-chrome-app .window-controls {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .window-chrome-app .lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    border-radius: 6px;
  }
  .window-chrome-app .lang-option {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 8px;
    color: var(--text-muted);
    border-radius: 4px;
    transition: background .15s, color .15s;
  }
  .window-chrome-app .lang-option[aria-pressed="true"] {
    background: var(--navy-900);
    color: var(--text-inverse);
  }
  .window-chrome-app .clock {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    min-width: 40px;
    text-align: right;
  }

  .os-body {
    display: grid;
    grid-template-columns: 190px 1fr;
    min-height: 0;
  }

  /* Pages panel (Figma-style) */
  .pages-panel {
    background: #FBFAF6;
    border-right: 1px solid var(--cream-border);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
  }
  .pages-panel .pages-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 4px 10px 10px;
  }
  .pages-panel .pages-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .pages-panel .pages-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-primary);
    border-radius: 5px;
    text-decoration: none;
    transition: background .15s, color .15s;
  }
  .pages-panel .pages-list a::before {
    content: "";
    width: 10px; height: 10px;
    border: 1.2px solid var(--cream-border);
    border-radius: 2px;
    background: var(--cream-surface);
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
  }
  .pages-panel .pages-list a:hover {
    background: var(--cream-hover);
    text-decoration: none;
  }
  .pages-panel .pages-list a.is-active {
    background: var(--navy-100);
    color: var(--navy-900);
    font-weight: 500;
  }
  .pages-panel .pages-list a.is-active::before {
    background: #0D99FF;
    border-color: #0D99FF;
  }

  /* Canvas scroller — scroll is INSIDE this */
  .canvas-scroller {
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--cream-bg);
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-border) transparent;
  }
  .canvas-scroller::-webkit-scrollbar { width: 10px; }
  .canvas-scroller::-webkit-scrollbar-track { background: transparent; }
  .canvas-scroller::-webkit-scrollbar-thumb {
    background: var(--cream-border);
    border-radius: 5px;
    border: 2px solid var(--cream-bg);
  }

  /* Each section = frame */
  .canvas-scroller > .frame {
    padding: 32px 40px;
    min-height: calc(100vh - 66px); /* viewport - 12×2 padding - 42 chrome */
    position: relative;
  }
  .canvas-scroller > .frame::before {
    content: attr(data-frame-label);
    position: absolute;
    top: 10px;
    left: 40px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #2E5FA3;
    letter-spacing: 0.02em;
    pointer-events: none;
  }

  /* Stack · un poco más de aire encima del label */
  .canvas-scroller > #stack.frame { padding-top: 44px; }
  .canvas-scroller > #stack.frame::before { top: 28px; }

  /* Nested .os-window inside frames: hide their chrome — frame label is enough */
  .canvas-scroller > .frame .section-wrapper,
  .canvas-scroller > .frame > .container { padding: 0; }
  .canvas-scroller > .frame .os-window {
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    transform: none !important;
    margin: 0;
  }
  .canvas-scroller > .frame .os-window > .window-chrome { display: none; }

  /* Hero frame: no padding (hero-canvas already has its own) */
  .canvas-scroller > #inicio.frame { padding: 0; min-height: calc(100vh - 66px); }
  .canvas-scroller > #inicio.frame::before { display: none; }
  .canvas-scroller > #inicio.hero-canvas-section > .container {
    height: 100%;
    padding: 0 !important;
    max-width: none !important;
  }
  .canvas-scroller > #inicio .hero-canvas {
    min-height: 100%;
    height: calc(100vh - 66px);
  }

  /* Footer inside scroller sits at bottom of last frame */
  .canvas-scroller > .site-footer {
    margin-top: 0;
    padding: 24px 40px;
    background: var(--cream-hover);
    border-top: 1px solid var(--cream-border);
  }
}

/* Mobile / tablet: flatten the shell. */
@media (max-width: 1023px) {
  .os-viewport,
  .os-window-app,
  .os-body,
  .canvas-scroller { display: contents; }
  .window-chrome-app,
  .pages-panel { display: none !important; }
  .frame::before {
    content: attr(data-frame-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--navy-700);
    letter-spacing: 0.02em;
    margin: 0 0 16px;
  }
  #inicio.frame::before { display: none; }
}
img, video, svg { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

/* ---------- Links ---------- */
a {
  color: var(--navy-700);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { text-decoration: underline; }

/* ---------- Utilities ---------- */
.text-mono         { font-family: var(--font-mono); }
.text-muted        { color: var(--text-muted); }
.text-accent-metric{ color: var(--accent-metric); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--space-xl); }
}

.grid-2, .grid-3 {
  display: grid;
  gap: var(--space-lg);
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-2xl); }
}

/* Offset first section for fixed menu-bar (mobile only — desktop uses app shell) */
@media (max-width: 1023px) {
  body { padding-top: 44px; }
}

/* ============================== */
/* HERO — Product Canvas (Miro+Figma) */
/* ============================== */
:root {
  --sticky-yellow: #FFEB91;
  --sticky-pink:   #FFC1D4;
  --sticky-blue:   #B6DDFF;
  --sticky-green:  #C7F0C9;
  --board-bg:      #FAF7F1;
  --board-dot:     #DED5C7;
}

.section-wrapper.hero-canvas-section > .container { max-width: 1600px; padding-inline: 24px; }
@media (min-width: 768px)  { .section-wrapper.hero-canvas-section > .container { padding-inline: 48px; } }
@media (min-width: 1280px) { .section-wrapper.hero-canvas-section > .container { padding-inline: 80px; } }

.hero-canvas {
  position: relative;
  padding: 24px;
  background-color: var(--board-bg);
  background-image:
    radial-gradient(var(--board-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 1024px) {
  .hero-canvas {
    min-height: 680px;
    padding: 56px 40px 72px;
  }
  .hero-canvas [data-draggable] { cursor: grab; }
  .hero-canvas [data-draggable].is-dragging { cursor: grabbing; }
}

/* ---------- Figma-style toolbar ---------- */
.canvas-toolbar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #1E1E1E;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.canvas-toolbar .tool {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #C8C8C8;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.canvas-toolbar .tool:hover { background: #2D2D2D; color: #fff; }
.canvas-toolbar .tool.is-active { background: #0D99FF; color: #fff; }
.canvas-toolbar .tool-divider { width: 1px; height: 18px; background: #3A3A3A; margin: 0 4px; }
@media (min-width: 1024px) { .canvas-toolbar { display: inline-flex; } }

/* ---------- Zoom controls ---------- */
.canvas-zoom {
  position: absolute;
  bottom: 16px; right: 16px;
  z-index: 25;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid var(--cream-border);
  border-radius: 8px;
  box-shadow: var(--shadow-window);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
}
.canvas-zoom button {
  width: 22px; height: 22px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
}
.canvas-zoom button:hover { background: var(--cream-hover); color: var(--navy-900); }
.canvas-zoom span { padding: 0 4px; letter-spacing: 0.02em; }
@media (min-width: 1024px) { .canvas-zoom { display: inline-flex; } }

/* ---------- Connections (arrows) ---------- */
.hero-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
  z-index: 2;
}
.hero-connections .conn {
  fill: none;
  stroke: #2E5FA3;
  stroke-opacity: 0.55;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.hero-connections .conn-3 {
  stroke-dasharray: 4 5;
  stroke-opacity: 0.4;
}
.hero-connections { display: none !important; }

/* ---------- Frame (Figma-style) ---------- */
.canvas-frame {
  display: none !important;
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 380px;
  border: 1.5px dashed rgba(46,95,163,0.35);
  border-radius: 4px;
  z-index: 1;
  pointer-events: none;
}
.canvas-frame .frame-label {
  position: absolute;
  top: -22px; left: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #2E5FA3;
  letter-spacing: 0.02em;
}
@media (min-width: 1024px) { .canvas-frame { display: block; } }

/* ---------- Hero text ---------- */
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-700);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.05;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.hero-tagline {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Main identity card ---------- */
.canvas-card {
  position: relative;
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-window);
  user-select: none;
  touch-action: pan-y;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.canvas-card p { margin: 0; }
.card-main {
  background: #FFFFFF;
  border: 1.5px solid var(--navy-200);
  box-shadow: 0 12px 40px rgba(27,58,107,0.14), 0 2px 8px rgba(27,58,107,0.06);
  padding: 26px 30px;
  max-width: 440px;
  z-index: 10;
}

.hero-contact-list {
  list-style: none;
  padding: 16px 0 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--cream-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.hero-contact-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.hero-contact-list .contact-key {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.hero-contact-list a { color: var(--navy-900); }
.hero-contact-list a:hover { color: var(--navy-700); text-decoration: underline; }

/* ---------- Post-its (Miro sticky notes) ---------- */
.sticky {
  position: relative;
  padding: 16px 14px 14px;
  min-height: 120px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.35;
  color: #2A241C;
  border-radius: 2px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.08),
    0 8px 18px rgba(0,0,0,0.10),
    inset 0 -14px 20px rgba(0,0,0,0.04);
  user-select: none;
  touch-action: pan-y;
}
.sticky p { margin: 0; }
.sticky::after {
  /* tape strip */
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 48px; height: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  pointer-events: none;
}
.sticky-yellow { background: var(--sticky-yellow); }
.sticky-pink   { background: var(--sticky-pink); }
.sticky-blue   { background: var(--sticky-blue); }
.sticky-green  { background: var(--sticky-green); }
.sticky .sticky-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 6px;
}
.sticky .sticky-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.22;
  margin: 8px 0 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: none;
}

/* ---------- Widgets (Figma-style chrome) ---------- */
.widget {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--cream-border);
  border-radius: 8px;
  box-shadow: var(--shadow-window);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  font-size: 13px;
  color: var(--text-primary);
}
.widget .widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #F7F4EE;
  border-bottom: 1px solid var(--cream-border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.widget .widget-title { color: var(--navy-900); font-weight: 500; }
.widget .widget-meta,
.widget .widget-delta {
  color: var(--navy-700);
  font-size: 10.5px;
}
.widget .widget-delta { color: #2B8A3E; }

/* Kanban */
.widget-kanban { width: 280px; }
.kanban-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  background: #FBFAF6;
}
.kan-col {
  background: #F1EDE4;
  border-radius: 6px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
}
.kan-col em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 2px 2px;
}
.kan-card {
  background: #FFFFFF;
  border: 1px solid #E2D9CE;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor: grab;
  transition: transform .15s ease, box-shadow .15s ease;
}
.kan-card:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.08); }
.kan-card.is-done { color: var(--text-muted); text-decoration: line-through; opacity: 0.75; }
.kan-card.is-dragging { opacity: 0.6; cursor: grabbing; box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.kan-col.is-hover { background: #E6E0D3; outline: 1.5px dashed #0D99FF; outline-offset: -3px; }

/* Chart */
.widget-chart { width: 260px; }
.chart-svg { width: 100%; height: 80px; display: block; padding: 8px 8px 0; }
.chart-line, .chart-area { transition: none; }
.chart-last {
  transform-origin: 220px 10px;
  animation: chart-pulse 2.2s ease-in-out infinite;
}
@keyframes chart-pulse {
  0%,100% { r: 3.5; }
  50%     { r: 5; }
}
.chart-axis {
  display: flex; justify-content: space-between;
  padding: 0 12px 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Backlog widget */
.widget-backlog { width: 220px; }
.widget-backlog ul { padding: 8px 12px 10px; }
.widget-backlog li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.widget-backlog .dot-check {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #2B8A3E;
  font-size: 12px;
}
.widget-backlog .dot-check.is-open { color: var(--text-muted); }
.widget-backlog em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-700);
  background: var(--navy-100);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Hover glow (Figma-style selection hint) */
@media (min-width: 1024px) {
  [data-draggable] { transition: box-shadow .18s ease, outline-color .18s ease; outline: 1px solid transparent; outline-offset: 2px; cursor: grab; }
  [data-draggable]:hover { outline-color: #0D99FF; }
  [data-draggable].is-dragging { z-index: 30; outline-color: #0D99FF; cursor: grabbing; }
}

/* Desktop layout positions */
@media (min-width: 1024px) {
  /* Sidebar on the left — fills canvas height */
  .hero-sidebar {
    position: absolute;
    top: 24px;
    left: 24px;
    bottom: 24px;
    width: 360px;
    display: flex;
    z-index: 10;
  }
  .hero-sidebar .card-main {
    position: static;
    transform: none;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }
  .hero-sidebar .hero-avatar-tag {
    position: relative;
    top: auto; left: auto;
    width: 88px;
    height: 88px;
    margin: 24px 0 4px 24px;
    padding: 0;
    gap: 0;
    background: var(--navy-100);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(27,58,107,0.12);
    overflow: hidden;
    display: block;
    cursor: pointer;
    transition: width 0.45s cubic-bezier(.2,.8,.2,1),
                height 0.45s cubic-bezier(.2,.8,.2,1),
                border-radius 0.45s cubic-bezier(.2,.8,.2,1),
                box-shadow 0.45s ease;
  }
  .hero-sidebar .hero-avatar-tag img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center 25%;
    border-radius: inherit;
    display: block;
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
  }
  .hero-sidebar .hero-avatar-tag:hover,
  .hero-sidebar .hero-avatar-tag.is-active {
    transform: none;
    width: 220px;
    height: 220px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(27,58,107,0.20);
  }
  .hero-sidebar .hero-avatar-tag:hover img,
  .hero-sidebar .hero-avatar-tag.is-active img {
    transform: scale(1.03);
  }

  .hero-sidebar .card-main > :not(.hero-avatar-tag) {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero-sidebar .card-main > .hero-eyebrow { padding-top: 18px; }
  .hero-sidebar .card-main > .hero-tagline { margin-bottom: 0; }
  .hero-sidebar .card-main > .hero-cta { margin-top: 22px; }
  .hero-sidebar .card-main > .hero-contact-list { padding-bottom: 22px; margin-top: auto; }

  /*
   * Canvas layout (right of 384px sidebar). Working zone: left≥420, right≥40.
   * Designed as an asymmetric product board — varied Y positions break grid
   * rigidity and distribute content across the full canvas height.
   *
   *   TOP:     [yellow quote] — [sprint kanban] — [pink problem]
   *   MID:     [blue discovery] ----------- [green hypothesis]
   *   BOTTOM:  [backlog RICE] -------------- [activation chart]
   */
  /*
   *  Distribución orgánica — nada alineado, cada item en su propia banda X/Y.
   *  El sidebar ocupa left:0-384. Zona útil: left ≥ 420, right ≥ 40.
   *  Los items se esparcen por toda la zona evitando columnas rígidas.
   */
  .sticky-yellow   { position: absolute; top:  70px;  left: 440px;  width: 180px; transform: rotate(-3.4deg);  z-index: 6; }
  .sticky-pink     { position: absolute; top:  48px;  right: 210px; width: 180px; transform: rotate(2.3deg);   z-index: 6; }
  .sticky-blue     { position: absolute; top: 300px;  left: 440px;  width: 180px; transform: rotate(1.6deg);   z-index: 6; }
  .sticky-green    { position: absolute; top: 210px;  right: 80px;  width: 190px; transform: rotate(-1.8deg);  z-index: 6; }

  .widget-kanban   { position: absolute; top: 240px;  left: 50%;    transform: translateX(-5%) rotate(-0.5deg); z-index: 7; }
  .widget-backlog  { position: absolute; bottom: 52px; left: 480px;  z-index: 7; transform: rotate(-0.4deg); }
  .widget-chart    { position: absolute; bottom: 52px; right: 140px; z-index: 7; transform: rotate(0.5deg); }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .hero-canvas-section .sticky-blue { display: none; }
  .hero-canvas-section .widget-backlog { left: 410px; }
  .hero-canvas-section .widget-chart { right: 40px; }
  .hero-canvas-section .widget-kanban { top: 180px; transform: translateX(-20%) rotate(-0.5deg); }
}

/* Mobile: stack */
@media (max-width: 1023px) {
  .hero-canvas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: start;
  }
  .hero-sidebar { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; }
  .card-main { grid-column: 1 / -1; max-width: none; }
  .widget-kanban, .widget-chart, .widget-backlog { width: auto; grid-column: 1 / -1; }
  .canvas-toolbar, .canvas-zoom, .canvas-frame, .hero-connections { display: none !important; }
  [data-draggable] { cursor: default; }
}
@media (max-width: 480px) {
  .hero-canvas { grid-template-columns: 1fr; }
  .sticky { min-height: auto; }
}

/* ---------- Avatar tag ---------- */
.hero-avatar-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--navy-900);
  color: var(--text-inverse);
  border-radius: 999px;
  box-shadow: var(--shadow-window);
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1),
              padding 0.35s ease,
              border-radius 0.35s ease;
  cursor: pointer;
  transform-origin: top left;
}
.hero-avatar-tag img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  transition: width 0.45s cubic-bezier(.2,.8,.2,1), height 0.45s cubic-bezier(.2,.8,.2,1);
}
.hero-avatar-tag .avatar-name {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  transition: font-size 0.35s ease;
}
.hero-avatar-tag:hover,
.hero-avatar-tag.is-active {
  transform: translate(24px, 24px) scale(1.05);
  padding: 8px 18px 8px 8px;
}
.hero-avatar-tag:hover img,
.hero-avatar-tag.is-active img {
  width: 160px;
  height: 160px;
}
.hero-avatar-tag:hover .avatar-name,
.hero-avatar-tag.is-active .avatar-name {
  font-size: 15px;
}
@media (max-width: 1023px) {
  .hero-avatar-tag { position: static; grid-column: 1 / -1; justify-self: start; cursor: pointer; }
  .hero-avatar-tag:hover,
  .hero-avatar-tag.is-active { transform: none; }
  .hero-avatar-tag:hover img,
  .hero-avatar-tag.is-active img { width: 36px; height: 36px; }
}

/* Photo lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(244, 239, 230, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.photo-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.photo-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  object-fit: contain;
}
.photo-lightbox__close {
  position: absolute;
  top: max(env(safe-area-inset-top), var(--space-md));
  right: var(--space-md);
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--navy-900);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  will-change: transform;
}
.btn-primary {
  background: var(--navy-900);
  color: var(--text-inverse);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--navy-700);
  color: var(--text-inverse);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-secondary {
  border: 1.5px solid var(--navy-900);
  color: var(--navy-900);
  font-weight: 500;
  background: transparent;
}
.btn-secondary:hover {
  background: var(--navy-900);
  color: var(--text-inverse);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ============================== */
/* METRICS + ABOUT                */
/* ============================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}
@media (min-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(4, 1fr); }
}

.metric-card {
  background: var(--navy-100);
  border: 1px solid var(--navy-200);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--accent-metric);
  line-height: 1;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.metric-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 1024px) {
  .about-layout {
    grid-template-columns: 3fr 2fr;
    gap: 60px;
  }
}
.about-text p {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.about-text p:last-child { margin-bottom: 0; }

.photo-placeholder {
  background: var(--navy-100);
  border: 2px dashed var(--cream-border);
  border-radius: 16px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.about-photo img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 16px;
}

/* ============================== */
/* WORK · CAREER INSPECTOR        */
/* ============================== */

/* Company mark colors — used on timeline nodes + detail headers */
:root {
  --mark-lacia-bg: var(--navy-200);
  --mark-lacia-fg: var(--navy-900);
  --mark-telefonica-bg: #E8E4F5;
  --mark-telefonica-fg: #3D2E7A;
  --mark-autohero-bg: #F5E4D9;
  --mark-autohero-fg: #8A3A14;
  --mark-tulotero-bg: #DDEFE4;
  --mark-tulotero-fg: #1E5A3A;
}

.widget-inspector {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.work-inspector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--cream-bg);
}

.timeline-scroller { display: none; }

/* --- Timeline (master) --- */
.work-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 0;
}
.work-timeline .timeline-line { display: none; } /* only visible in desktop sidebar */

.timeline-node {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}
.timeline-node .node-dot { display: none; }
.timeline-node:hover { border-color: var(--navy-700); transform: translateY(-1px); }
.timeline-node.is-active {
  background: var(--navy-100);
  border-color: var(--navy-700);
}

.node-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  background: var(--navy-100);
  color: var(--navy-900);
}
.mark-lacia      { background: var(--mark-lacia-bg);      color: var(--mark-lacia-fg); }
.mark-telefonica { background: var(--mark-telefonica-bg); color: var(--mark-telefonica-fg); }
.mark-autohero   { background: var(--mark-autohero-bg);   color: var(--mark-autohero-fg); }
.mark-tulotero   { background: var(--mark-tulotero-bg);   color: var(--mark-tulotero-fg); }

.node-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.node-company {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-900);
  letter-spacing: 0.01em;
}
.node-role {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.35;
}
.node-period {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Role detail panel --- */
.work-detail {
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 10px;
  padding: 20px;
  min-height: 380px;
}
.role-panel[hidden] { display: none; }
.role-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.role-header {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--cream-border);
}
.role-mark-big {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  background: var(--navy-100);
  color: var(--navy-900);
}
.role-header-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.role-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--navy-700);
  background: var(--navy-100);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 2px;
}
.role-company {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  color: var(--navy-900);
  margin: 0;
}
.role-industry {
  font-size: 13px;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}
.role-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 2px 0 0;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.role-meta-sep { display: none; }

/* Hero metric */
.role-hero-metric {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--cream-bg);
  border-radius: 10px;
  border-left: 3px solid var(--accent-metric);
}
.hero-metric-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--accent-metric);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.hero-metric-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
}

/* Context paragraph */
.role-context {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
}

/* Achievements grid */
.role-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.achievement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.achievement-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 8px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.achievement-card:hover { border-color: var(--navy-700); transform: translateY(-1px); }
.achievement-card strong {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-900);
  letter-spacing: 0.01em;
}
.achievement-card span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Stack chips */
.stack-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-chips li {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cream-bg);
  border: 1px solid var(--cream-border);
  color: var(--text-muted);
}

/* Learning callout (quote) */
.role-learning {
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 44px;
  background: var(--cream-bg);
  border-radius: 10px;
  border-left: 2px solid var(--navy-700);
}
.role-learning .learning-mark {
  position: absolute;
  top: 2px; left: 12px;
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  color: var(--navy-700);
  opacity: 0.55;
}
.role-learning p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  color: var(--navy-900);
}

/* ============================== */
/* PROJECTS — OS WINDOW STACK     */
/* ============================== */
.projects-intro {
  font-size: 17px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 32px;
  max-width: 680px;
}

/* Mobile-first base: stacked vertical windows, no pin */
.projects-stack { position: relative; }
.projects-stage { position: relative; }
.projects-hud { display: none; }
.projects-deck {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-window {
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-window);
  display: flex;
  flex-direction: column;
}
.project-window > .window-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  height: 36px;
  background: var(--cream-hover);
  border-bottom: 1px solid var(--cream-border);
  position: relative;
}
.project-window > .window-chrome .window-dots { display: flex; gap: 6px; }
.project-window > .window-chrome .dot {
  width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.project-window > .window-chrome .dot-red    { background: #FF5F57; }
.project-window > .window-chrome .dot-yellow { background: #FEBC2E; }
.project-window > .window-chrome .dot-green  { background: #28C840; }
.project-window > .window-chrome .window-title { display: none; }

.project-window-body {
  display: flex;
  flex-direction: column;
}

.project-video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-100);
}
.project-video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  pointer-events: none;
}
.project-video::-webkit-media-controls,
.project-video::-webkit-media-controls-panel,
.project-video::-webkit-media-controls-start-playback-button,
.project-video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
}
.project-video-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-100);
  color: var(--text-muted);
  font-family: var(--font-mono); font-size: 12px;
  pointer-events: none;
}
.project-video-wrapper.video-ready .project-video-placeholder { display: none; }

.project-info {
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.project-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.project-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--navy-900);
  margin: 0;
}
.project-badge {
  background: var(--sticky-yellow, #FFEB91);
  color: #2A241C;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.project-desc {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
}
.project-desc p { margin: 0 0 10px; }
.project-desc p:last-child { margin-bottom: 0; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  background: var(--navy-100);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--navy-700);
}
.project-link {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy-900);
  text-decoration: none;
  align-self: flex-start;
  margin-top: 4px;
}
.project-link:hover { color: var(--navy-700); }

/* ============================== */
/* STACK · htop + terminal        */
/* ============================== */
.stack-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* widget-htop */
.widget-htop .htop-body {
  padding: 12px 14px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy-900);
}
.widget-htop .htop-cols {
  display: grid;
  grid-template-columns: 32px 1fr 72px minmax(140px, 1.6fr) 44px;
  gap: 10px;
  padding: 4px 6px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--cream-border);
  margin-bottom: 4px;
}
.widget-htop .htop-cols span:last-child { text-align: right; }
.widget-htop .htop-area-sep {
  margin: 10px 6px 4px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-metric);
  border-top: 1px dashed var(--cream-border);
  padding-top: 8px;
}
.widget-htop .htop-area-sep:first-of-type { border-top: 0; padding-top: 2px; margin-top: 4px; }
.widget-htop .htop-row {
  display: grid;
  grid-template-columns: 32px 1fr 72px minmax(140px, 1.6fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background .15s ease;
}
.widget-htop .htop-row:hover { background: var(--cream-hover); }
.widget-htop .htop-pid { color: var(--text-muted); }
.widget-htop .htop-tool { color: var(--navy-900); font-weight: 500; }
.widget-htop .htop-use { color: var(--text-muted); font-size: 11px; }
.widget-htop .htop-bar {
  height: 10px;
  background: var(--cream-hover);
  border: 1px solid var(--cream-border);
  border-radius: 2px;
  overflow: hidden;
}
.widget-htop .htop-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--navy-700);
  border-right: 1px solid rgba(255,255,255,0.35);
}
.widget-htop .htop-row[data-load="90"] .htop-bar-fill,
.widget-htop .htop-row[data-load="95"] .htop-bar-fill,
.widget-htop .htop-row[data-load="100"] .htop-bar-fill {
  background: var(--accent-metric);
}
.widget-htop .htop-row[data-use="learning"] .htop-bar-fill { background: #c9a227; }
.widget-htop .htop-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--navy-900);
}

/* widget-term */
.widget-term { background: #1b1f24; color: #e8e2d3; border-color: #0f1216; }
.widget-term .widget-head { background: #111418; border-bottom: 1px solid #0f1216; }
.widget-term .widget-title { color: #e8e2d3; font-family: var(--font-mono); }
.widget-term .widget-meta { color: #7b8795; }
.widget-term .term-body { padding: 12px 14px 14px; font-family: var(--font-mono); }
.widget-term .term-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #2a3038;
  margin-bottom: 10px;
}
.widget-term .term-cmd {
  appearance: none;
  background: transparent;
  color: #c8bfae;
  border: 1px solid #2a3038;
  border-radius: 4px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.widget-term .term-cmd:hover { border-color: #5a9bd5; color: #fff; }
.widget-term .term-cmd.is-active {
  background: #5a9bd5;
  color: #0b0e12;
  border-color: #5a9bd5;
}
.widget-term .term-output {
  margin: 0;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: #e8e2d3;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 180px;
}
.widget-term .term-prompt { color: #5a9bd5; }
.widget-term .term-accent { color: var(--accent-metric); }
.widget-term .term-caret {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #e8e2d3;
  vertical-align: -2px;
  margin-left: 2px;
  animation: term-blink 1s steps(2, end) infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }

/* ============================== */
/* CONTACT                        */
/* ============================== */
.contact-layout {
  max-width: 640px;
  margin: 0 auto;
}
.contact-intro { margin-bottom: 40px; }
.contact-intro h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.contact-intro p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
}

.form-field { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--cream-border);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--cream-bg);
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
  outline: none;
}
.form-input:focus {
  border-color: var(--navy-700);
  background: #fff;
}
.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions { margin-top: 32px; }
.btn-send {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}
.btn-send:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
.form-status.success,
.form-status.error { display: block; }
.form-status.success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.form-status.error   { background: #FFF1F2; color: #9F1239; border: 1px solid #FECDD3; }

.site-footer {
  border-top: 1px solid var(--cream-border);
  padding: 24px 0;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.footer-text,
.footer-version {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .site-footer {
    border-top: 0;
    padding: var(--space-lg) 0;
    margin-top: 0;
  }
  .site-footer .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--space-sm);
    position: relative;
    padding-top: var(--space-lg);
  }
  .site-footer .container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: var(--cream-border);
  }
  .footer-text {
    letter-spacing: 0.02em;
  }
  .footer-version {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
}

.hero-photo-placeholder {
  background: var(--navy-100);
  border-radius: 16px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  border: 2px dashed var(--cream-border);
  font-size: var(--text-sm);
}

/* ================================================== */
/* FRAME CANVAS (about/work/projects/stack/contact)   */
/* ================================================== */
@media (min-width: 1024px) {
  /* Dotted background identical to hero, on every frame except home */
  .canvas-scroller > .frame-canvas {
    background-color: var(--board-bg);
    background-image: radial-gradient(var(--board-dot) 1px, transparent 1px);
    background-size: 22px 22px;
    background-position: 0 0;
    padding: 48px 48px 56px;
  }
  .canvas-scroller > .frame-canvas::before {
    top: 18px; left: 48px;
    font-size: 12px;
  }
  .frame-canvas .frame-body {
    position: relative;
    min-height: 100%;
    max-width: 1400px;
    margin: 32px auto 0;
  }
}

/* =========================== */
/* FRAME · ABOUT               */
/* =========================== */
@media (min-width: 1024px) {
  #about .frame-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px 28px;
    align-items: start;
  }
  #about > .frame-body > .sticky {
    align-self: start;
    justify-self: start;
    width: 170px;
    min-height: 150px;
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  /* yellow · between text blocks and image */
  #about > .frame-body > .sticky:nth-of-type(1) { grid-column: 2; grid-row: 2; justify-self: end; transform: translate(-50px, 0) rotate(-2.5deg); }
  /* pink · bottom-left, upper */
  #about > .frame-body > .sticky:nth-of-type(2) { grid-column: 1; grid-row: 2; transform: translate(100px, -260px) rotate(1.5deg); }
  /* blue · bottom-left, lower */
  #about > .frame-body > .sticky:nth-of-type(3) { grid-column: 1; grid-row: 3; transform: translate(-140px, -320px) rotate(-1deg); }
  /* green · bottom-left, lower right */
  #about > .frame-body > .sticky:nth-of-type(4) { grid-column: 2; grid-row: 3; transform: translate(-1040px, -180px) rotate(2deg); }
  #about .sticky .sticky-text {
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.15vw, 1.2rem);
    font-weight: 600;
    color: var(--navy-900);
    line-height: 1.2;
    margin-top: 10px;
    letter-spacing: -0.015em;
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }

  #about .widget-manifesto {
    grid-column: 1 / span 2;
    grid-row: 1;
    transform: rotate(-0.4deg);
  }
  #about .manifesto-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: #FBFAF6;
  }
  #about .m-note {
    background: #FFFDF4;
    border: 1px solid var(--cream-border);
    border-left: 3px solid var(--navy-700);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.55;
  }
  #about .m-note .sticky-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--navy-700);
    letter-spacing: 0.12em;
    margin-bottom: 6px;
  }

  #about .ref-image {
    grid-column: 3 / span 2;
    grid-row: 1 / span 3;
    align-self: start;
    justify-self: center;
    width: min(100%, 520px);
    background: #fff;
    border: 1px solid var(--cream-border);
    border-radius: 8px;
    box-shadow: var(--shadow-window);
    padding: 0;
    overflow: hidden;
    transform: rotate(2.5deg);
    position: relative;
  }
  #about .ref-image .ref-image-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #F7F4EE;
    border-bottom: 1px solid var(--cream-border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
  }
  #about .ref-image .ref-image-icon { color: #0D99FF; }
  #about .ref-image .ref-image-name { color: var(--navy-900); flex: 1; }
  #about .ref-image .ref-image-dim {
    background: var(--navy-100);
    color: var(--navy-700);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
  }
  #about .ref-image .ref-tape {
    position: absolute;
    top: 38px; right: 14px;
    width: 60px; height: 16px;
    background: rgba(13,153,255,0.22);
    transform: rotate(-8deg);
    border: 1px solid rgba(13,153,255,0.35);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    z-index: 2;
  }
  #about .ref-image img {
    width: 100%;
    height: auto;
    max-height: 640px;
    aspect-ratio: 1024 / 1536;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

/* =========================================== */
/* FRAME · ABOUT — narrow desktop (1024–1399)  */
/* =========================================== */
@media (min-width: 1024px) and (max-width: 1399.98px) {
  #about .frame-body {
    gap: 16px 20px;
  }
  #about > .frame-body > .sticky {
    width: 140px;
    min-height: 120px;
    padding: 10px 12px 10px;
  }
  #about .sticky .sticky-text {
    font-size: clamp(0.85rem, 1vw, 1rem);
  }
  #about > .frame-body > .sticky:nth-of-type(1) { grid-column: 2; grid-row: 2; justify-self: end; transform: translate(-100px, -60px) rotate(-2.5deg); }
  #about > .frame-body > .sticky:nth-of-type(2) { grid-column: 1; grid-row: 2; transform: translate(140px, -330px) rotate(1.5deg); }
  #about > .frame-body > .sticky:nth-of-type(3) { grid-column: 1; grid-row: 3; transform: translate(-110px, -370px) rotate(-1deg); }
  #about > .frame-body > .sticky:nth-of-type(4) { grid-column: 2; grid-row: 3; transform: translate(-710px, -270px) rotate(2deg); }

  #about .ref-image {
    width: min(100%, 380px);
    transform: rotate(2deg);
  }
  #about .ref-image img {
    max-height: 480px;
  }
}

/* =========================== */
/* FRAME · WORK (desktop)      */
/* =========================== */
@media (min-width: 1024px) {
  #work .widget-inspector {
    transform: rotate(-0.3deg);
  }
  #work .work-inspector {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 22px;
    min-height: 560px;
  }

  /* Timeline: 22px left gutter. Each dot sits outside the node in that
     gutter (absolute, to the left of the node border). No connector line. */
  #work .work-timeline {
    position: relative;
    padding: 4px 0 4px 22px;
    gap: 8px;
  }
  #work .work-timeline .timeline-line { display: none; }
  #work .timeline-node {
    grid-template-columns: 36px 1fr;
    padding: 12px 14px;
  }
  #work .timeline-node .node-dot {
    display: block;
    position: absolute;
    top: 50%;
    left: -16px;
    transform: translateY(-50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--cream-surface);
    border: 2px solid var(--cream-border);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
  #work .timeline-node:hover .node-dot {
    border-color: var(--navy-700);
  }
  #work .timeline-node.is-active .node-dot {
    background: var(--navy-700);
    border-color: var(--navy-700);
    box-shadow: 0 0 0 3px rgba(46, 95, 163, 0.18);
  }
  #work .node-mark {
    width: 36px; height: 36px;
    font-size: 13px;
    border-radius: 8px;
  }
  #work .node-company { font-size: 12.5px; }
  #work .node-role { font-size: 13px; }

  /* Detail panel — compact grid that fits in a single viewport */
  #work .work-detail {
    padding: 20px 24px;
    min-height: 460px;
  }

  #work .role-panel[hidden] { display: none; }
  #work .role-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    grid-template-areas:
      "header   hero"
      "context  context"
      "hilites  hilites"
      "stack    quote";
    gap: 14px 22px;
  }

  #work .role-header {
    grid-area: header;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding-bottom: 0;
    border-bottom: none;
  }
  #work .role-mark-big {
    width: 52px; height: 52px;
    font-size: 18px;
    border-radius: 10px;
  }
  #work .role-company { font-size: 22px; }
  #work .role-industry { font-size: 13.5px; line-height: 1.4; }
  #work .role-meta { font-size: 11px; }

  #work .role-hero-metric {
    grid-area: hero;
    align-self: start;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 14px;
  }
  #work .hero-metric-value { font-size: 36px; line-height: 1; }
  #work .hero-metric-label { font-size: 12.5px; line-height: 1.35; }

  #work .role-context {
    grid-area: context;
    margin: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--cream-border);
    font-size: 14px;
    line-height: 1.55;
  }

  #work .role-section--highlights { grid-area: hilites; gap: 8px; }
  #work .role-section--stack      { grid-area: stack; gap: 8px; }

  #work .role-learning {
    grid-area: quote;
    margin: 0;
    padding: 10px 14px 10px 36px;
    align-self: start;
  }
  #work .role-learning .learning-mark {
    font-size: 32px;
    top: 0;
    left: 10px;
  }
  #work .role-learning p { font-size: 14px; line-height: 1.4; }

  #work .achievement-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  #work .achievement-card { padding: 10px 12px; gap: 2px; }
  #work .achievement-card strong { font-size: 11.5px; }
  #work .achievement-card span { font-size: 12.5px; line-height: 1.45; }

  #work .stack-chips { gap: 5px; }
  #work .stack-chips li { font-size: 10.5px; padding: 2px 9px; }
}

@media (min-width: 1280px) {
  #work .work-inspector { grid-template-columns: 300px 1fr; gap: 28px; }
  #work .role-panel { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px 26px; }
  #work .achievement-grid { grid-template-columns: repeat(3, 1fr); }
  #work .role-company { font-size: 24px; }
  #work .hero-metric-value { font-size: 44px; }
}

@media (min-width: 1280px) and (max-width: 1399.98px) {
  #work .work-inspector { grid-template-columns: 240px 1fr; gap: 24px; }
  #work .role-header { grid-template-columns: 1fr; }
  #work .role-mark-big { display: none; }
  #work .role-company { font-size: 19px; }
}

/* =========================== */
/* FRAME · PROJECTS — desktop pin stack */
/* =========================== */
@media (min-width: 1024px) {
  #projects.frame-projects { padding: 0; min-height: 0; }
  #projects.frame-projects::before { z-index: 5; }
  #projects.frame-projects > .frame-body { padding: 32px 40px 0; max-width: none; margin: 0; }

  #projects .projects-intro {
    max-width: 720px;
    margin: 0 auto 8px;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
  }

  /* Stack: single-viewport frame, tab-switched */
  #projects .projects-stack {
    position: relative;
    width: 100%;
  }
  #projects .projects-stage {
    position: relative;
    min-height: clamp(560px, 78vh, 820px);
    width: 100%;
    overflow: hidden;
  }

  /* HUD: tabs + counter */
  #projects .projects-hud {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 32px 0;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 10;
    pointer-events: none;
  }
  #projects .projects-tabs {
    display: flex; gap: 6px;
    background: var(--cream-surface);
    border: 1px solid var(--navy-200);
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--shadow-hover);
    pointer-events: auto;
    transition: transform .2s ease, box-shadow .2s ease;
  }
  #projects .projects-tabs:hover { transform: translateY(-1px); }
  #projects .projects-tabs button {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .18s, color .18s;
  }
  #projects .projects-tabs button:hover {
    background: var(--cream-hover);
    color: var(--navy-900);
  }
  #projects .projects-tabs button.active {
    background: var(--navy-900);
    color: var(--cream-bg);
    font-weight: 600;
  }
  #projects .projects-counter {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--navy-900);
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    border-radius: 999px;
    padding: 6px 14px;
    box-shadow: var(--shadow-window);
    pointer-events: auto;
    letter-spacing: 0.06em;
    position: absolute;
    right: 32px;
    top: 24px;
  }
  #projects .projects-counter .cur { color: var(--accent-metric); font-weight: 600; }
  #projects .projects-counter .sep { color: var(--cream-border); margin: 0 2px; }

  /* Deck: holds absolutely-positioned windows */
  #projects .projects-deck {
    position: absolute;
    inset: 0;
    display: block;
  }

  /* Project window — desktop horizontal layout */
  #projects .project-window {
    position: absolute;
    top: 92px; left: 50%;
    width: clamp(940px, 78vw, 1240px);
    height: min(620px, calc(100vh - 160px));
    transform: translateX(-50%) scale(0.98);
    opacity: 0;
    pointer-events: none;
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    display: flex;
    flex-direction: column;
    transition: opacity .35s ease, transform .35s ease;
    backface-visibility: hidden;
  }
  #projects .project-window.is-active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
    z-index: 2;
  }
  #projects .project-window > .window-chrome {
    height: 38px;
    flex-shrink: 0;
    background: var(--cream-hover);
  }
  #projects .project-window > .window-chrome .window-title {
    font-size: 12.5px;
    color: var(--navy-900);
  }

  #projects .project-window-body {
    flex: 1; min-height: 0;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
  }
  #projects .project-window-body .project-video-wrapper {
    aspect-ratio: auto;
    height: 100%;
    border-right: 1px solid var(--cream-border);
    background: var(--cream-hover);
  }
  #projects .project-window-body .project-info {
    padding: 32px clamp(28px, 2.4vw, 44px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto;
  }
  #projects .project-window-body .project-name {
    font-family: var(--font-display);
    font-size: clamp(30px, 2.3vw, 40px);
    line-height: 1.05;
    color: var(--navy-900);
    margin: 0;
  }
  #projects .project-window-body .project-desc {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.55;
    margin: 0;
  }
  #projects .project-window-body .tag {
    font-size: 11.5px;
    padding: 3px 8px;
  }
  #projects .project-window-body .project-link {
    font-size: 13px;
    margin-top: 6px;
  }

}

/* Narrow desktop (1024–1399): shrink window and avoid cropping the mockup */
@media (min-width: 1024px) and (max-width: 1399.98px) {
  #projects .project-window {
    width: min(80vw, 960px);
    height: min(440px, calc(100vh - 220px));
  }
  #projects .project-window-body {
    grid-template-columns: 1.15fr 1fr;
  }
  #projects .project-window-body .project-video-wrapper {
    background: var(--cream-bg);
  }
  #projects .project-window-body .project-video {
    object-fit: cover;
  }
  #projects .project-window-body .project-info {
    padding: 24px clamp(20px, 2vw, 32px);
  }
  #projects .project-window-body .project-name {
    font-size: clamp(26px, 2vw, 32px);
  }
}

/* Reduced motion: disable pin/transforms, render as vertical stack */
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  #projects .projects-stack { height: auto; }
  #projects .projects-stage { height: auto; overflow: visible; }
  #projects .projects-hud { display: none; }
  #projects .projects-deck {
    position: static;
    display: flex; flex-direction: column; gap: 32px;
    padding: 24px 40px 40px;
  }
  #projects .project-window {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    opacity: 1 !important;
    filter: none !important;
  }
  #projects .project-window-body { display: flex; flex-direction: column; }
  #projects .project-window-body .project-video-wrapper { aspect-ratio: 16/9; height: auto; border-right: 0; border-bottom: 1px solid var(--cream-border); }
}

/* =========================== */
/* FRAME · STACK               */
/* =========================== */
@media (min-width: 1024px) {
  #stack .stack-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
  }
  #stack .widget-htop { transform: rotate(-0.2deg); min-width: 0; }
  #stack .widget-term { transform: rotate(0.25deg); min-width: 0; align-self: stretch; }
  #stack .widget-term .term-output { min-height: 420px; }
}

/* =========================== */
/* FRAME · CONTACT (composer)  */
/* =========================== */
#contact .widget-composer {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
#contact .mail-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}
#contact .mail-to-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--cream-hover);
  border-bottom: 1px solid var(--cream-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
#contact .mail-to-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 8px;
  border: 1px solid var(--cream-border);
  border-radius: 4px;
  background: var(--cream-surface);
}
#contact .mail-to-value { color: var(--navy-900); font-weight: 500; }
#contact .mail-to-chip {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  color: var(--text-muted);
}

#contact .mail-form {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#contact .mail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#contact .mail-field { display: flex; flex-direction: column; gap: 4px; }
#contact .mail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#contact .mail-input,
#contact .mail-textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 12px;
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 6px;
  color: var(--text-primary);
  width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
#contact .mail-input:hover,
#contact .mail-textarea:hover { border-color: #CFC3B2; }
#contact .mail-input:focus,
#contact .mail-textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(46, 95, 163, 0.15);
  background: #fff;
}
#contact .mail-input::placeholder,
#contact .mail-textarea::placeholder { color: #B8AC9D; }
#contact .mail-textarea { resize: vertical; min-height: 140px; line-height: 1.5; }

#contact .form-honeypot { position: absolute; left: -9999px; }

#contact .mail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
#contact .mail-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
#contact .mail-status {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  background: transparent;
  border: 1px solid transparent;
}
#contact .mail-status.success,
#contact .mail-status.error { display: block; }
#contact .mail-status.success {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #15803D;
}
#contact .mail-status.error {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #B91C1C;
}

#contact .btn-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-900);
  color: var(--text-inverse);
  padding: 10px 18px;
  border: 1px solid var(--navy-900);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s, border-color .15s;
}
#contact .btn-send svg { width: 14px; height: 14px; transition: transform .2s; }
#contact .btn-send:hover { background: var(--navy-700); border-color: var(--navy-700); }
#contact .btn-send:hover svg { transform: translateX(2px); }
#contact .btn-send:active { transform: translateY(1px); }
#contact .btn-send:disabled { opacity: .55; cursor: default; }
#contact .btn-send:disabled:hover { background: var(--navy-900); border-color: var(--navy-900); }

@media (min-width: 1024px) {
  #contact .frame-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
  }
  #contact .widget-dock {
    width: 100%;
    max-width: 680px;
  }
  #contact .widget-dock .widget-head { justify-content: space-between; }
}

@media (max-width: 767px) {
  #contact .mail-grid { grid-template-columns: 1fr; }
  #contact .mail-to-chip { display: none; }
  #contact .mail-footer { flex-wrap: wrap; }
  #contact .btn-send { width: 100%; justify-content: center; }
  #contact .mail-form { padding: 16px 14px; gap: 12px; }
  #contact .mail-input,
  #contact .mail-textarea { font-size: 16px; }
  #contact .mail-textarea { min-height: 120px; }
  #contact .mail-to-row { padding: 10px 14px; gap: 8px; }
  #contact .mail-to-label { padding: 2px 8px; font-size: 10px; }
  #contact .mail-to-value { font-size: 13px; }
}

/* =========================== */
/* CHANNEL DOCK                */
/* =========================== */
.channel-dock {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  padding: 22px 20px 18px;
  background: linear-gradient(180deg, var(--cream-hover) 0%, var(--cream-surface) 100%);
  border-top: 1px solid var(--cream-border);
}
.dock-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 84px;
  height: 84px;
  padding: 8px;
  background: var(--cream-surface);
  border: 1px solid var(--cream-border);
  border-radius: 16px;
  color: var(--navy-900);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(27, 58, 107, 0.06);
  transform-origin: bottom center;
  transition: transform .25s cubic-bezier(.2,.8,.2,1),
              box-shadow .25s,
              background .2s,
              border-color .2s,
              color .2s;
}
.dock-tile:hover,
.dock-tile:focus-visible {
  transform: translateY(-8px) scale(1.08);
  box-shadow: var(--shadow-hover);
  background: #fff;
  border-color: var(--navy-200);
  outline: none;
}
.channel-dock:hover .dock-tile:not(:hover) { transform: scale(.96); opacity: .85; }
.dock-tile + .dock-tile:hover { /* neighbor lift handled by :hover of itself */ }

.dock-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy-100);
  color: var(--navy-700);
}
.dock-icon svg { width: 22px; height: 22px; }
.dock-tile-wa .dock-icon { background: #E7F8EE; color: #25D366; }
.dock-tile-in .dock-icon { background: #E3EEF7; color: #0A66C2; }
.dock-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--text-muted);
}
.dock-tile:hover .dock-label { color: var(--navy-900); }

.dock-tooltip {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 5px 10px;
  background: var(--navy-900);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.dock-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--navy-900);
}
.dock-tile:hover .dock-tooltip,
.dock-tile:focus-visible .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1023px) {
  #contact .widget-dock {
    margin-top: 0;
    transform: rotate(0.5deg);
    border-radius: 14px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
  }
  .channel-dock {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .dock-tile {
    width: 100%;
    height: 64px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 14px;
  }
  .dock-icon { width: 36px; height: 36px; }
  .dock-label { font-size: 12px; color: var(--navy-900); }
  .channel-dock:hover .dock-tile:not(:hover) { transform: none; opacity: 1; }
  .dock-tile:hover { transform: none; }
  .dock-tooltip { display: none; }
}

/* Mobile fallback for all new frames — let content flow naturally */
@media (max-width: 1023px) {
  #about .frame-body,
  #work .frame-body,
  #projects .frame-body,
  #stack .frame-body { display: block; }
  #contact .frame-body { display: flex; flex-direction: column; gap: 16px; }

  #contact.frame-canvas {
    background-color: var(--board-bg, #F4EFE6);
    background-image: radial-gradient(var(--board-dot, rgba(27,58,107,0.08)) 1px, transparent 1px);
    background-size: 18px 18px;
    padding: 20px 20px 32px;
    border-top: 1px dashed var(--cream-border);
  }
  #contact .widget-composer {
    max-width: none;
    border-radius: 14px;
    box-shadow: var(--shadow-window);
    transform: rotate(-0.6deg);
    transform-origin: top left;
    overflow: hidden;
    background: var(--cream-surface);
  }
  #contact .widget-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  #about > .frame-body > .sticky { transform: none; margin-bottom: 12px; }
  #work .work-inspector { grid-template-columns: 1fr; }
  #stack .stack-layout { display: block; }
  #stack .widget-htop, #stack .widget-term { transform: none; }
  #stack .widget-htop { margin-bottom: 24px; }

  /* Stack · canvas background to match about/projects mobile feel */
  #stack.frame-canvas {
    background-color: var(--board-bg, #F4EFE6);
    background-image: radial-gradient(var(--board-dot, rgba(27,58,107,0.08)) 1px, transparent 1px);
    background-size: 18px 18px;
    padding: 20px 20px 32px;
    border-top: 1px dashed var(--cream-border);
  }

  /* htop · redesigned as two-line cards per row */
  #stack .widget-htop { border-radius: 10px; box-shadow: var(--shadow-window); overflow: hidden; }
  #stack .widget-htop .htop-body { padding: 6px 8px 10px; font-size: 13px; }
  #stack .widget-htop .htop-cols { display: none; }

  #stack .widget-htop .htop-area-sep {
    margin: 18px 2px 6px;
    padding: 2px 0 2px 10px;
    border-top: 0;
    border-left: 3px solid var(--accent-metric);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--accent-metric);
  }
  #stack .widget-htop .htop-area-sep:first-of-type { margin-top: 6px; }

  #stack .widget-htop .htop-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
    column-gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    border-bottom: 1px dashed var(--cream-border);
  }
  #stack .widget-htop .htop-row:last-child { border-bottom: 0; }
  #stack .widget-htop .htop-row:hover { background: transparent; }

  #stack .widget-htop .htop-pid {
    grid-column: 1; grid-row: 1;
    font-size: 11px;
    color: var(--text-muted);
    align-self: center;
  }
  #stack .widget-htop .htop-tool {
    grid-column: 2; grid-row: 1;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--navy-900);
    word-break: break-word;
    align-self: center;
    font-family: var(--font-body);
    letter-spacing: -0.005em;
  }
  #stack .widget-htop .htop-pct {
    grid-column: 3; grid-row: 1;
    font-size: 12.5px;
    font-weight: 600;
    align-self: center;
  }
  #stack .widget-htop .htop-bar {
    grid-column: 1 / 3; grid-row: 2;
    height: 8px;
    align-self: center;
  }
  #stack .widget-htop .htop-use {
    grid-column: 3; grid-row: 2;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: right;
    align-self: center;
  }

  /* terminal · touch-friendly chips + readable output */
  #stack .widget-term { border-radius: 10px; box-shadow: 0 6px 22px rgba(10,14,18,0.18); overflow: hidden; }
  #stack .widget-term .widget-head { padding: 10px 12px; }
  #stack .widget-term .term-body { padding: 12px 12px 14px; }
  #stack .widget-term .term-cmds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }
  #stack .widget-term .term-cmd {
    padding: 10px 12px;
    font-size: 12.5px;
    text-align: center;
    min-height: 40px;
  }
  #stack .widget-term .term-output {
    font-size: 13px;
    line-height: 1.6;
    padding: 10px 8px;
    min-height: 240px;
  }
  #contact .mail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  #stack .widget-htop .htop-row { padding: 8px 10px; column-gap: 8px; }
  #stack .widget-htop .htop-tool { font-size: 13.5px; }
  #stack .widget-htop .htop-body { font-size: 12.5px; }
  #stack .widget-term .term-cmd { font-size: 12px; padding: 9px 8px; }
}

/* ============================== */
/* MOBILE · PROJECTS (Pinned board) */
/* ============================== */
@media (max-width: 1023px) {
  #projects.frame-canvas {
    background-color: var(--board-bg, #F4EFE6);
    background-image: radial-gradient(var(--board-dot, rgba(27,58,107,0.08)) 1px, transparent 1px);
    background-size: 18px 18px;
    padding: 20px 24px 32px;
    border-top: 1px dashed var(--cream-border);
  }

  #projects .projects-hud {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 10px;
    position: static;
  }
  #projects .projects-tabs { display: none; }
  #projects .projects-counter {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    padding: 4px 10px;
    border-radius: 999px;
  }

  #projects .projects-deck { gap: 20px; }

  #projects .project-window {
    border-radius: 10px;
  }
  #projects .project-info {
    padding: 18px 18px 20px;
    gap: 9px;
  }
  #projects .project-name { font-size: 20px; }
  #projects .project-desc {
    font-size: 13.5px;
    line-height: 1.55;
  }
  #projects .project-desc p { margin: 0 0 8px; }
  #projects .project-desc p:last-child { margin-bottom: 0; }
  #projects .project-tags { gap: 4px; }
  #projects .project-tags .tag {
    font-size: 10.5px;
    padding: 2px 6px;
  }
  #projects .project-link {
    font-size: 12.5px;
    margin-top: 6px;
  }
}

/* ============================== */
/* MOBILE · ABOUT (Pinned board)   */
/* ============================== */
@media (max-width: 1023px) {
  #inicio.hero-canvas-section,
  #about.frame-canvas { padding-top: 0; padding-bottom: 0; }
  #about.frame-canvas {
    background-color: var(--board-bg, #F4EFE6);
    background-image: radial-gradient(var(--board-dot, rgba(27,58,107,0.08)) 1px, transparent 1px);
    background-size: 18px 18px;
    padding: 20px 24px 32px;
    border-top: 1px dashed var(--cream-border);
  }
  #about .frame-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 14px;
    padding: 0;
    position: relative;
  }
  #about .frame-body > .mobile-frame-label { grid-column: 1 / -1; }
  #about > .frame-body > .sticky {
    margin: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: 16px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
  }
  #about .sticky .sticky-text {
    font-size: 0.95rem;
    line-height: 1.22;
  }
  #about > .frame-body > .sticky:nth-of-type(1) { transform: rotate(-1.5deg); margin-top: 4px; }
  #about > .frame-body > .sticky:nth-of-type(2) { transform: rotate(1.6deg);  margin-top: -2px; }
  #about > .frame-body > .sticky:nth-of-type(3) { transform: rotate(1.2deg);  margin-top: -6px; }
  #about > .frame-body > .sticky:nth-of-type(4) { transform: rotate(-1.3deg); margin-top: -4px; }

  #about .widget-manifesto {
    grid-column: 1 / -1;
    margin-top: 16px;
    background: #FBFAF6;
    border: 1px solid var(--cream-border);
    border-radius: 8px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
  }
  #about .widget-manifesto .widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--cream-border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
  }
  #about .manifesto-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }
  #about .m-note {
    background: #FFFDF4;
    border: 1px solid var(--cream-border);
    border-left: 3px solid var(--navy-700);
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 14.5px;
    line-height: 1.55;
  }
  #about .m-note p { margin: 0; }
  #about .m-note .sticky-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--navy-700);
    letter-spacing: 0.12em;
    margin-bottom: 6px;
  }

  #about .ref-image {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 260px);
    background: #fff;
    border: 1px solid var(--cream-border);
    border-radius: 8px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
    transform: rotate(-2deg);
    margin: 16px 0 8px;
    position: relative;
  }
  #about .ref-image .ref-image-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #F7F4EE;
    border-bottom: 1px solid var(--cream-border);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
  }
  #about .ref-image .ref-image-icon { color: #0D99FF; }
  #about .ref-image .ref-image-name { color: var(--navy-900); flex: 1; }
  #about .ref-image .ref-image-dim {
    background: var(--navy-100);
    color: var(--navy-700);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
  }
  #about .ref-image .ref-tape {
    position: absolute;
    top: 30px;
    right: 12px;
    width: 50px;
    height: 14px;
    background: rgba(13,153,255,0.22);
    transform: rotate(-8deg);
    border: 1px solid rgba(13,153,255,0.35);
    z-index: 2;
  }
  #about .ref-image img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* ============================== */
/* MOBILE · WORK (Career inspector)*/
/* ============================== */
@media (max-width: 1023px) {
  #work.frame-canvas {
    background-color: var(--board-bg, #F4EFE6);
    background-image: radial-gradient(var(--board-dot, rgba(27,58,107,0.08)) 1px, transparent 1px);
    background-size: 18px 18px;
    padding: 20px 24px 32px;
    border-top: 1px dashed var(--cream-border);
    padding-top: 0;
    padding-bottom: 0;
  }
  #work .frame-body { padding: 0; }

  #work .widget-inspector {
    background: #FBFAF6;
    border: 1px solid var(--cream-border);
    border-radius: 8px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
    max-width: none;
    margin: 0;
  }
  #work .widget-inspector > .widget-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--cream-border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
  }

  #work .work-inspector {
    display: block;
    padding: 12px;
    gap: 0;
    background: transparent;
    grid-template-columns: none;
    position: relative;
  }

  #work .timeline-scroller {
    display: inline-flex;
    position: absolute;
    top: 20px;
    width: 32px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--cream-border);
    background: var(--cream-surface);
    color: var(--navy-900);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(27,58,107,0.08);
    z-index: 4;
    cursor: pointer;
    transition: opacity .2s ease, transform .15s ease;
  }
  #work .timeline-scroller:active { transform: scale(0.94); }
  #work .timeline-scroller[disabled] { opacity: 0; pointer-events: none; }
  #work .timeline-scroller-prev { left: 2px; }
  #work .timeline-scroller-next { right: 2px; }

  /* Timeline: horizontal scroll rail */
  #work .work-timeline {
    display: flex;
    flex-direction: row;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 44px;
    padding: 4px 44px 10px;
    margin-inline: -12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--cream-border);
  }
  #work .work-timeline::-webkit-scrollbar { display: none; }
  #work .timeline-line { display: none; }

  #work .timeline-node {
    flex: 0 0 38vw;
    width: 38vw;
    max-width: 150px;
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 10px;
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    border-radius: 8px;
    grid-template-columns: none;
    overflow: hidden;
  }
  #work .timeline-node .node-body { min-width: 0; width: 100%; }
  #work .timeline-node .node-company,
  #work .timeline-node .node-role {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  #work .timeline-node .node-dot,
  #work .timeline-node .node-period { display: none; }
  #work .timeline-node .node-mark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #work .timeline-node .node-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  #work .timeline-node .node-company {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-900);
    line-height: 1.1;
  }
  #work .timeline-node .node-role {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.2;
  }
  #work .timeline-node.is-active {
    border-color: var(--navy-700);
    background: var(--navy-100);
    box-shadow: 0 2px 6px rgba(27,58,107,0.08);
  }

  /* Detail: index card */
  #work .work-detail {
    background: var(--cream-surface);
    border: 1px solid var(--cream-border);
    border-radius: 8px;
    padding: 16px;
    min-height: 0;
  }
  #work .role-panel { gap: 14px; }

  #work .role-header {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cream-border);
  }
  #work .role-mark-big { display: none; }
  #work .role-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--navy-700);
    text-transform: uppercase;
  }
  #work .role-company { font-size: 18px; line-height: 1.2; }
  #work .role-meta {
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  #work .role-meta .role-meta-sep { display: none; }

  #work .role-hero-metric {
    padding: 10px 12px;
    border-radius: 6px;
    gap: 10px;
    align-items: center;
    background: #FFFDF4;
    border-left: 3px solid var(--accent-metric);
  }
  #work .hero-metric-value { font-size: 32px; line-height: 1; }
  #work .hero-metric-label { font-size: 12.5px; line-height: 1.4; }

  #work .role-context { font-size: 13.5px; line-height: 1.55; }

  #work .role-section-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
  }

  /* Achievements as numbered list */
  #work .achievement-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-template-columns: none;
    border-top: 1px solid var(--cream-border);
    counter-reset: ach;
    margin-top: 6px;
  }
  #work .achievement-card {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 8px;
    padding: 10px 2px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--cream-border);
    border-radius: 0;
    counter-increment: ach;
  }
  #work .achievement-card::before {
    content: counter(ach, decimal-leading-zero);
    grid-column: 1;
    grid-row: 1;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--navy-700);
    padding-top: 3px;
  }
  #work .achievement-card strong {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    color: var(--navy-900);
    line-height: 1.25;
    min-width: 0;
  }
  #work .achievement-card span {
    grid-column: 2;
    grid-row: 2;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-muted);
    min-width: 0;
  }

  #work .stack-chips { gap: 5px; }
  #work .stack-chips li { padding: 2px 8px; font-size: 10.5px; }

  #work .role-learning {
    background: #FFFDF4;
    border: 1px solid var(--cream-border);
    border-left: 3px solid var(--navy-700);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13.5px;
    line-height: 1.5;
  }
  #work .role-learning .learning-mark { display: none; }
  #work .role-learning p { margin: 0; }
}

/* ============================== */
/* Responsive hardening (Phase 2)  */
/* ============================== */

/* Prevent sticky hover on touch devices */
@media (hover: none) {
  .kan-card:hover,
  .hero-avatar-tag:hover,
  .timeline-node:hover { transform: none; }
}

/* Avoid phantom horizontal scroll from subtle rotates on iOS Safari */
.os-window,
.hero-canvas {
  overflow-x: hidden;
  overflow-x: clip;
}

/* Landscape phone: short viewport, avoid oversized sections */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  .hero-canvas { padding: 16px; }
  .boot-screen { font-size: 12px; }
}

/* Small mobile (<360px): tighten padding to avoid horizontal overflow */
@media (max-width: 360px) {
  .container { padding-inline: var(--space-sm); }
  .section-wrapper.hero-canvas-section > .container { padding-inline: 12px; }
}

/* =====================================================================
   HERO — Mobile "Lock Screen OS" (≤ 640px)
   Reinterpreta el canvas Figma como pantalla de bloqueo de móvil.
   Solo afecta al hero; no toca desktop ni otras secciones.
   ===================================================================== */
@media (max-width: 1023px) {
  /* Unificar hero con el resto de frames: sin chrome, sin ventana flotante */
  .section-wrapper.hero-canvas-section { padding: 0 !important; }
  .section-wrapper.hero-canvas-section > .container { padding-inline: 0 !important; max-width: none; }
  .hero-canvas-section .os-window {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }
  .hero-canvas-section .window-chrome { display: none; }
  .hero-canvas-section .hero-canvas {
    padding: 20px 24px 32px;
    min-height: auto;
    background-color: var(--board-bg, #F4EFE6);
    background-image: radial-gradient(var(--board-dot, rgba(27,58,107,0.08)) 1px, transparent 1px);
    background-size: 18px 18px;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  /* Canvas → columna simple centrada (reinterpretación "lock screen") */
  .hero-canvas-section .hero-canvas {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  /* Identity card — sin bordes, centrado, look lock-screen */
  .hero-canvas-section .hero-sidebar {
    position: static;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .hero-canvas-section .card-main {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 4px 0;
    text-align: center;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  /* Avatar grande circular centrado */
  .hero-canvas-section .hero-avatar-tag {
    position: static;
    width: 132px;
    height: 132px;
    padding: 0;
    border-radius: 50%;
    background: var(--cream-surface);
    box-shadow: 0 8px 24px rgba(27, 58, 107, 0.18);
    overflow: hidden;
    transform: none !important;
    margin-bottom: 4px;
  }
  .hero-canvas-section .hero-avatar-tag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  .hero-canvas-section .hero-avatar-tag::after,
  .hero-canvas-section .hero-avatar-tag .avatar-text { display: none; }

  .hero-canvas-section .hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy-700);
    padding: 4px 10px;
    border: 1px solid var(--navy-200);
    border-radius: 999px;
    background: rgba(255,255,255,0.6);
  }
  .hero-canvas-section .hero-name {
    font-size: clamp(2.25rem, 10vw, 2.75rem);
    line-height: 1.05;
    color: var(--navy-900);
    margin: 2px 0;
  }
  .hero-canvas-section .hero-tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 4px;
  }

  /* CTAs apilados full-width, pill */
  .hero-canvas-section .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-canvas-section .hero-cta .btn-primary,
  .hero-canvas-section .hero-cta .btn-secondary {
    width: 100%;
    min-height: 48px;
    border-radius: 999px;
    justify-content: center;
    font-size: 0.95rem;
  }
  .hero-canvas-section .hero-cta .btn-secondary {
    background: var(--cream-surface);
  }

  /* Contact list como widget glass */
  .hero-canvas-section .hero-contact-list {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--cream-border);
    border-radius: 16px;
    padding: 12px 14px;
    margin-top: 4px;
    width: 100%;
    row-gap: 8px;
    text-align: left;
  }
  .hero-canvas-section .hero-contact-list li {
    grid-template-columns: 48px 1fr;
    column-gap: 16px;
    justify-items: start;
    text-align: left;
  }

  /* Stickies: conservar sólo la pink como widget destacado */
  .hero-canvas-section .sticky {
    position: static;
    width: 100%;
    transform: none !important;
    rotate: 0deg !important;
  }
  .hero-canvas-section .sticky-yellow,
  .hero-canvas-section .sticky-blue,
  .hero-canvas-section .sticky-green { display: none; }
  .hero-canvas-section .sticky-pink {
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(27, 58, 107, 0.10);
    min-height: auto;
  }

  /* Widgets del canvas ocultos en mobile (saturan el lock screen) */
  .hero-canvas-section .widget-kanban,
  .hero-canvas-section .widget-chart,
  .hero-canvas-section .widget-backlog { display: none; }

  /* Asegura ocultos los ornamentos del canvas */
  .hero-canvas-section .canvas-toolbar,
  .hero-canvas-section .canvas-zoom,
  .hero-canvas-section .canvas-frame,
  .hero-canvas-section .hero-connections { display: none !important; }
}
