/* Portfolio palette: 50/50 background and 60/40 translucent surfaces. */
html[data-portfolio-palette="gray-petroleum"] {
  --portfolio-background: #0c0e11;
  --portfolio-surface: #1a1d22;
  --portfolio-surface-deep: #111317;
  --portfolio-card: linear-gradient(135deg, #1c1f24db, #111317d2);
  --portfolio-card-shadow: inset 0 1px #ffffff1f, inset 0 -1px #ffffff08, 0 12px 28px #00000038;
}

html[data-portfolio-palette="gray-petroleum"] body,
html[data-portfolio-palette="gray-petroleum"] body::before {
  background: var(--portfolio-background);
}

/* The landscape is its own background layer. No ancestor of the content,
   project covers, brand marks, portrait or characters receives a filter. */
html[data-portfolio-palette="gray-petroleum"] #site .world,
html[data-portfolio-palette="gray-petroleum"] #site[data-view] .world {
  background-color: var(--portfolio-background);
  filter: grayscale(.68) brightness(.84);
}
html[data-portfolio-palette="gray-petroleum"] #site .world::before {
  background: linear-gradient(180deg, #0a0c0f24 0%, #0a0c0f38 26%, #0a0c0fde 75%, #0a0c0ff0 100%);
}
html[data-portfolio-palette="gray-petroleum"] .ambient-light {
  background: radial-gradient(ellipse at 18% 60%, #ffffff07, transparent 44%),
    radial-gradient(ellipse at 82% 22%, #c8d4e00c, transparent 40%);
}

/* Header and persistent reading veil retain their original geometry. */
html[data-portfolio-palette="gray-petroleum"] .site-header::before {
  background: linear-gradient(#0b0d10cc, #0b0d106e 70%, transparent);
}
html[data-portfolio-palette="gray-petroleum"] .site-header .header-controls :is(#music-toggle, #menu-button) {
  background: transparent;
  box-shadow: none;
}
html[data-portfolio-palette="gray-petroleum"] .site-header .header-controls :is(#music-toggle, #menu-button):hover,
html[data-portfolio-palette="gray-petroleum"] .site-header .header-controls #music-toggle.music-is-playing {
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 0 8px #4dfd9a75);
}
html[data-portfolio-palette="gray-petroleum"] .dial-footer::before {
  background: linear-gradient(to top,
    color-mix(in srgb, #171717 50%, #09131b 50%) 0px, color-mix(in srgb, #171717 50%, #09131b 50%) var(--dial-veil-solid),
    color-mix(in srgb, #171717e0 50%, #09131be0 50%) calc(var(--dial-veil-solid) + var(--dial-veil-ramp) * .25),
    color-mix(in srgb, #17171780 50%, #09131b80 50%) calc(var(--dial-veil-solid) + var(--dial-veil-ramp) * .5),
    color-mix(in srgb, #1717171f 50%, #09131b1f 50%) calc(var(--dial-veil-solid) + var(--dial-veil-ramp) * .75),
    color-mix(in srgb, #17171700 50%, #09131b00 50%) var(--dial-veil-transparent), color-mix(in srgb, #17171700 50%, #09131b00 50%) 100%);
}
html[data-portfolio-palette="gray-petroleum"] .swipe-hint::before {
  background: radial-gradient(ellipse at 50% 46%, color-mix(in srgb, #17171726 50%, #09131b26 50%) 0%, color-mix(in srgb, #17171714 50%, #09131b14 50%) 52%, color-mix(in srgb, #17171708 50%, #09131b08 50%) 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
html[data-portfolio-palette="gray-petroleum"] .swipe-hint::after {
  background: #ffffff05;
}

/* Shared cards cover Perfil, Trabajo, Cómo trabajo, Experimentos and Contacto.
   Inicio's separate card components use the same neutral material here. */
html[data-portfolio-palette="gray-petroleum"] #site .view .ui-glass,
html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-proof-card,
html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-featured {
  background: var(--portfolio-card);
  box-shadow: var(--portfolio-card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html[data-portfolio-palette="gray-petroleum"] #site .view .ui-glass::before,
html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-proof-card::before {
  background: radial-gradient(ellipse at var(--lx,10%) var(--ly,0%), #ffffff09, transparent 72%);
}
html[data-portfolio-palette="gray-petroleum"] #site .view .ui-glass:focus-within,
html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-proof-card:focus-within,
html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-featured:focus-visible {
  box-shadow: inset 0 1px #afffd366, 0 0 26px #4dfd9a4d, 0 12px 34px #00000040;
}
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .project-row {
  background: var(--portfolio-card);
  box-shadow: inset 1px 0 color-mix(in srgb, var(--project-accent) 38%, transparent),
    inset 0 1px #ffffff18, 0 9px 22px #00000024;
}
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .project-row[aria-current="true"] {
  background: linear-gradient(110deg, color-mix(in srgb, #363636ed 60%, #102832ed 40%), color-mix(in srgb, #252525de 60%, #102832de 40%));
  box-shadow: inset 1px 0 var(--project-accent), inset 0 1px #ffffff2e, 0 0 16px color-mix(in srgb, var(--project-accent) 16%, transparent), 0 10px 28px #00000028;
}
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .project-row::before {
  background: radial-gradient(ellipse at var(--lx,10%) var(--ly,0%), #ffffff09, transparent 72%);
}
html[data-portfolio-palette="gray-petroleum"] #site #perfil .career-node {
  background: transparent;
}
html[data-portfolio-palette="gray-petroleum"] #site #perfil .portrait {
  box-shadow: 0 18px 46px #00000029;
}

/* Existing media remain in color. Only their empty frames and UI labels change. */
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .work-cover.is-protected,
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .work-cover.is-protected #detail-cover,
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .case-screenshot,
html[data-portfolio-palette="gray-petroleum"] #site #experimentos .experiment-media:not(.is-characters) {
  background: color-mix(in srgb, #202020 60%, #102832 40%);
}
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .case-screenshot span {
  background: color-mix(in srgb, #1b1b1be6 60%, #071820e6 40%);
}
html[data-portfolio-palette="gray-petroleum"] #site #trabajo .work-cover.is-protected::after {
  background: color-mix(in srgb, #202020eb 60%, #102832eb 40%);
}

/* Cómo trabajo has several nested surfaces outside the shared glass class. */
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .process-route {
  background: linear-gradient(125deg, #1a1d22e3, #111317d6);
  box-shadow: inset 0 1px #ffffff1a, 0 12px 28px #00000030;
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .process-node {
  background: linear-gradient(#16191e, #16191e00);
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .process-stage-detail {
  background: linear-gradient(90deg, #14171ce6, #1b1f259c);
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .measure-scene {
  background: color-mix(in srgb, #202020 60%, #102832 40%);
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .measure-scene::after {
  background: linear-gradient(180deg, color-mix(in srgb, #11111144 60%, #07121a44 40%), transparent 28%, color-mix(in srgb, #17171773 60%, #09131b73 40%) 100%);
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .scene-focus b {
  background: color-mix(in srgb, #1b1b1be6 60%, #071820e6 40%);
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .measure-answers > button:not(.selected) {
  background: linear-gradient(120deg, #ffffff0d, #ffffff05);
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .measure-recap {
  background: #ffffff07;
}
html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido :is(.measure-intro, .process-route-heading > span) {
  text-shadow: 0 1px 4px color-mix(in srgb, #111111 60%, #07121a 40%), 0 2px 18px color-mix(in srgb, #111111 60%, #07121a 40%);
}

/* Menu, music and character settings stay visually consistent with the site.
   Do not filter their models or override their mint primary buttons. */
html[data-portfolio-palette="gray-petroleum"] :is(#preview-dialog, dialog.character-studio) {
  background: linear-gradient(135deg, color-mix(in srgb, #292929f5 60%, #102832f5 40%), color-mix(in srgb, #1b1b1bfa 60%, #071820fa 40%) 70%);
  box-shadow: inset 0 1px #ffffff24, 0 30px 100px #00000080;
  border-color: #77777780;
}
html[data-portfolio-palette="gray-petroleum"] :is(#menu, #music-dialog) {
  background: linear-gradient(180deg, color-mix(in srgb, #0e0e0ea8 50%, #07121aa8 50%) 0%, color-mix(in srgb, #0b0b0bc2 50%, #050f16c2 50%) 100%);
  border: 0;
  box-shadow: none;
}
html[data-portfolio-palette="gray-petroleum"] :is(#preview-dialog, dialog.character-studio)::backdrop {
  background: color-mix(in srgb, #080808c4 60%, #020c13c4 40%);
}
html[data-portfolio-palette="gray-petroleum"] .character-studio .studio-stage {
  background: radial-gradient(ellipse at 50% 55%, #ffffff08, transparent 65%),
    linear-gradient(160deg, #ffffff07, color-mix(in srgb, #10101070 60%, #04121b70 40%));
  box-shadow: inset 0 1px #ffffff14;
}
html[data-portfolio-palette="gray-petroleum"] .character-studio .studio-stage-glow {
  background: radial-gradient(ellipse, #ffffff14, transparent 65%);
}
html[data-portfolio-palette="gray-petroleum"] .character-studio .studio-options button:not([aria-pressed="true"]) {
  background: #ffffff08;
}

/* The instrument has its own SVG paints. Neutralize its metal and face only;
   the mint indicator/glow, needle geometry and motion stay unchanged. */
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-face stop:nth-child(1) {
  stop-color: #23262b;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-face stop:nth-child(2) {
  stop-color: #131519;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-face stop:nth-child(3) {
  stop-color: #0b0d10cc;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-rim stop:nth-child(1) {
  stop-color: #b4bbc4;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-rim stop:nth-child(2) {
  stop-color: #383d45;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-rim stop:nth-child(3) {
  stop-color: #191c21;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art #gauge-rim stop:nth-child(4) {
  stop-color: #6e7580;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art .gauge-back {
  fill: #0e1013eb;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art > circle[r="138"] {
  stroke: #4c525c;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art > circle[r="129"] {
  stroke: #ffffff24;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art > circle[r="112"] {
  stroke: #ffffff14;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art .gauge-arc {
  stroke: #b8c0c8;
  filter: drop-shadow(0 0 5px #ffffff1f);
}
html[data-portfolio-palette="gray-petroleum"] #dial-art .minor-tick {
  stroke: #7d8590;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art .major-tick {
  stroke: #dfe4ea;
}
html[data-portfolio-palette="gray-petroleum"] #dial-art .gauge-dot:not(.active) {
  fill: #c7cdd4;
  stroke: #6e7580;
}

@media (hover: hover) and (pointer: fine) {
  html[data-portfolio-palette="gray-petroleum"] #site .view .ui-glass:hover,
  html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-proof-card:hover,
  html[data-portfolio-palette="gray-petroleum"] #site #inicio .home-featured:hover {
    background: linear-gradient(135deg, #23272ee6, #14171cd9);
    box-shadow: inset 0 1px #afffd366, 0 0 26px #4dfd9a44, 0 12px 34px #00000045;
  }
  html[data-portfolio-palette="gray-petroleum"] #site #trabajo .project-row:hover {
    box-shadow: inset 1px 0 var(--project-accent), inset 0 1px color-mix(in srgb, var(--project-accent) 32%, #ffffff38), 0 0 18px color-mix(in srgb, var(--project-accent) 20%, transparent), 0 12px 30px #00000038;
  }
  html[data-portfolio-palette="gray-petroleum"] #site #trabajo .project-row[aria-current="true"]:hover {
    background: linear-gradient(110deg, color-mix(in srgb, #393939ed 60%, #102832ed 40%), color-mix(in srgb, #292929de 60%, #102832de 40%));
    box-shadow: inset 1px 0 var(--project-accent), inset 0 1px color-mix(in srgb, var(--project-accent) 40%, #ffffff3d), 0 0 22px color-mix(in srgb, var(--project-accent) 24%, transparent);
  }
  html[data-portfolio-palette="gray-petroleum"] #site #como-lo-mido .measure-answers > button:hover:not(:disabled) {
    background: #4dfd9a19;
  }
  html[data-portfolio-palette="gray-petroleum"] #site #perfil .portrait:hover {
    box-shadow: 0 0 0 1px #4dfd9a63, 0 0 26px #4dfd9a4a, 0 18px 46px #00000029;
  }
}
