/* Base compartida: fuentes propias, colores, reset y botones.
   La usan el portafolio y las demos (coulomb_laws). */

@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/cormorant-garamond-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-style: italic; font-display: swap; src: url('../fonts/cormorant-garamond-latin-600-italic.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('../fonts/instrument-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url('../fonts/instrument-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('../fonts/instrument-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 700; font-display: swap; src: url('../fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }

/* Colores: tema oscuro "luxury" por defecto (negro cálido + dorado champán).
   El botón de la barra cambia a un tema claro marfil. */
:root {
  color-scheme: dark;
  --bg: #0B0B0D;
  --surface: #131316;
  --surface-2: #1B1B20;
  --ink: #F4EFE6;
  --muted: #B9B2A5;           /* contraste >= 9:1 sobre --bg */
  --line: #2B2A2E;
  --line-strong: #4A4333;
  --amber: #C9A55C;           /* dorado: relleno de botones y marcas */
  --amber-ink: #15110A;       /* texto sobre dorado */
  --amber-text: #D9B96C;      /* texto de acento */
  --teal: #7FC4B2;
  --danger: #F2877C;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 40px rgba(0, 0, 0, 0.45);
  --glow: radial-gradient(60% 50% at 80% 0%, rgba(201, 165, 92, 0.14), transparent 70%);

  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F8F4EC;
  --surface: #FFFFFF;
  --surface-2: #F0EADD;
  --ink: #1A1610;
  --muted: #5A5245;
  --line: #E1D8C6;
  --line-strong: #C9B88F;
  --amber: #B8923F;
  --amber-ink: #FFFFFF;
  --amber-text: #7A5A18;
  --teal: #0F6B5E;
  --danger: #B42318;
  --shadow: 0 1px 2px rgba(60, 45, 15, 0.06), 0 14px 34px rgba(60, 45, 15, 0.08);
  --glow: radial-gradient(60% 50% at 80% 0%, rgba(184, 146, 63, 0.14), transparent 70%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.005em; text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: 1rem; letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { border-color: var(--amber); color: var(--amber-text); }
.btn-primary { background: linear-gradient(135deg, #E3C47E, #BF9A4F 55%, #A98233); border-color: transparent; color: #15110A; }
:root[data-theme="light"] .btn-primary { background: linear-gradient(135deg, #C7A04B, #A98233); color: #fff; }
.btn-primary:hover { color: #15110A; filter: brightness(1.08); }
:root[data-theme="light"] .btn-primary:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
