/* ====== Base: noir / portfolio (darker) ====== */
:root{
  --bg: #05070b;
  --bg-2: #080b11;

  --panel: rgba(255,255,255,0.045);
  --panel-2: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.09);

  --text: rgba(255,255,255,0.90);
  --muted: rgba(255,255,255,0.58);

  --accent: rgba(214,178,106,0.92);

  /* naranja oscuro (interacciones) */
  --orange: #d97706;

  --shadow: 0 18px 48px rgba(0,0,0,.55);

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

html, body { height: 100%; }

body{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 18% 8%, rgba(255,255,255,.035), transparent 62%),
    radial-gradient(900px 500px at 82% 12%, rgba(255,255,255,.02), transparent 58%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  position: relative;
}

/* ===== Fondo en capas (imagen + código) ===== */
.bg-decor{
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Capa de boceto (imagen) */
.bg-sketch{
  position: absolute;
  inset: 0;
  background-image: url("../imgs/bg-noir-sketch.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.12;
  filter: contrast(1.05); /* 👈 sin grayscale */
}

/* Capa de “código” ultra sutil */
.bg-code{
  position: absolute;
  inset: 0;
  opacity: 0.08;         /* muy sutil */
  mix-blend-mode: screen; /* brillo suave sobre negro */
  transform: translate3d(0,0,0);
}

/* Texto blanco muy tenue */
.bg-code::before{
  content:
"// Unity • C# • Gameplay Systems • Architecture • Events • State Machines\n"
"public interface IGameState { void Enter(); void Tick(float dt); void Exit(); }\n"
"// Scene flow • Input System • Cinemachine • URP • WebGL\n"
"if (isPlayerTurn) recorder.Record(input); else clone.Play(loop);\n"
"// ScriptableObjects • decoupled managers • clean code • polish\n"
"// UI • Audio • Transitions • Performance • Pooling\n";
  position: absolute;
  left: -6%;
  top: 18%;
  width: 112%;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.10);
  transform: rotate(-9deg);
}

/* Palabras “resaltadas” en naranja MUY suave (capa aparte) */
.bg-code::after{
  content:
"Architecture    Events    State Machines    ScriptableObjects    Clean Code\n"
"Polish    Performance    Pooling    UI    Audio\n";
  position: absolute;
  left: -2%;
  top: 29%;
  width: 104%;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(217,119,6,0.12); /* naranja casi imperceptible */
  transform: rotate(-9deg);
}

/* ===== Typography ===== */
h1,h2,h3,h4,h5{ letter-spacing: -0.02em; }
p,li,small{ color: var(--muted); }

a{ color: var(--text); }
a:hover{ color: var(--accent); }

/* ===== Navbar ===== */
.navbar{
  backdrop-filter: blur(10px);
  background: rgba(6,8,12,.78) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Marca / nombre navbar */
.brand-mark {
  display: inline-flex;
  align-items: center;   
  gap: .6rem;
}

.brand-name{
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.08rem;
  line-height: 1;
}

.brand-role{
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  line-height: 1;
}

/* ===== Hero ===== */
.hero-wrap{
  background:
    radial-gradient(1100px 600px at 15% 10%, rgba(255,255,255,.03), transparent 62%),
    radial-gradient(900px 520px at 85% 15%, rgba(255,255,255,.02), transparent 58%);
}

.hero-kicker{
  letter-spacing: .12em;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.hero-title{ letter-spacing: -0.03em; }
.hero-lead{ color: rgba(255,255,255,.70); }

/* Featured blocks */
.featured-card,
.quick-stat{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.featured-img{
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  display: block;
  filter: saturate(1.02) contrast(1.02);
}

.featured-meta{
  background: rgba(0,0,0,0.35);
  border-top: 1px solid rgba(255,255,255,0.09);
}

/* ===== Cards ===== */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}

.card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-img-top{
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

.card-title{
  color: rgba(255,255,255,0.95);
  font-weight: 800;
  transition: transform .15s ease, letter-spacing .15s ease;
}

.card:hover .card-title{
  transform: translateX(2px);
  letter-spacing: 0.02em;
}

/* ===== Buttons ===== */
.btn{
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* Primary (remove blue -> orange) */
.btn-primary{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.92);
}

.btn-primary:hover{
  background: rgba(217,119,6,0.14);
  border-color: rgba(217,119,6,0.45);
  color: rgba(255,255,255,0.95);
}

.btn-primary:active,
.btn-primary.active{
  background: rgba(217,119,6,0.22) !important;
  border-color: rgba(217,119,6,0.65) !important;
  color: rgba(255,255,255,0.98) !important;
}

.btn-primary:focus,
.btn-primary:focus-visible{
  box-shadow: 0 0 0 .2rem rgba(217,119,6,0.28) !important;
}

/* HERO buttons ONLY (Play on itch.io / GitHub) */
.hero-wrap .btn-outline-light{
  background: transparent;
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.92);
}

/* text turns orange, never black */
.hero-wrap .btn-outline-light:hover,
.hero-wrap .btn-outline-light:focus,
.hero-wrap .btn-outline-light:focus-visible{
  color: var(--orange) !important;
  border-color: rgba(217,119,6,0.55) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Secondary outline */
.btn-outline-secondary{
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
}

.btn-outline-secondary:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
}

/* ===== Badges ===== */
.badge{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.82) !important;
  font-weight: 700;
}

/* ===== Inputs (remove blue focus) ===== */
.form-control{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: var(--radius-sm);
}

.form-control:focus{
  border-color: rgba(217,119,6,0.55);
  box-shadow: 0 0 0 .2rem rgba(217,119,6,0.20);
}

.form-control::placeholder{
  color: rgba(255,255,255,0.45);
}

/* ===== Footer ===== */
footer{
  border-top: 1px solid var(--border);
  background: rgba(6,8,12,.70);
  backdrop-filter: blur(10px);
}

/* ===== Code blocks ===== */
pre{
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: rgba(230,237,243,.95);
}

/* ===== Outline -> Solid Orange (for buttons that currently turn white on hover) ===== */

/* Orange solid you already use */
:root{
  --orange: #d97706;
  --orange-dark: #b45309; /* optional for active */
}

/* Custom class: keeps white outline, turns solid orange on hover */
.btn-outline-orange-solid{
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: rgba(255,255,255,0.92) !important;
}

.btn-outline-orange-solid:hover{
  background: var(--orange) !important;     /* solid */
  border-color: var(--orange) !important;
  color: #0b0f19 !important;               /* dark text for contrast */
}

.btn-outline-orange-solid:focus,
.btn-outline-orange-solid:focus-visible{
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #0b0f19 !important;
  box-shadow: 0 0 0 .2rem rgba(217,119,6,0.35) !important;
}

.btn-outline-orange-solid:active,
.btn-outline-orange-solid.active{
  background: var(--orange-dark) !important;
  border-color: var(--orange-dark) !important;
  color: #0b0f19 !important;
}

/* CV header: override Bootstrap bg-light + orange divider */
header.cv-header.bg-light{
  background: transparent !important; /* evita el blanco */
}

header.cv-header{
  border-bottom: 1px solid var(--orange) !important;
}

/* ===== Navbar accent: role in orange ===== */

.brand-role{
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color .15s ease, opacity .15s ease;
}

/* Optional: subtle reaction when hovering the whole brand */
.brand-mark:hover .brand-role{
  color: rgba(217,119,6,0.95); /* slightly brighter orange */
  opacity: 1;
}

/* ===== Klaro theming (optional) ===== */
.klaro .cookie-notice,
.klaro .cookie-modal .cm-modal,
.klaro .cookie-modal .cm-body,
.klaro .cookie-modal .cm-header {
  background: rgba(6,8,12,.92) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.90) !important;
}

.klaro .cookie-notice a,
.klaro .cookie-modal a {
  color: var(--orange) !important;
}

.klaro .cm-btn,
.klaro .cookie-notice .cn-buttons button {
  border-radius: var(--radius-sm) !important;
  font-weight: 800 !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  background: transparent !important;
  color: rgba(255,255,255,0.92) !important;
}

.klaro .cm-btn.cm-btn-success,
.klaro .cookie-notice .cn-buttons .cn-accept {
  background: rgba(217,119,6,0.18) !important;
  border-color: rgba(217,119,6,0.55) !important;
}

.klaro .cm-btn:hover,
.klaro .cookie-notice .cn-buttons button:hover {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: #0b0f19 !important;
}
.pixel-logo {
  image-rendering: pixelated;
}
