/* =====================================================
   BASE — variables, tipografía y reset
   (lo comparten la home y las páginas de proyecto)
===================================================== */

:root {
  /*** TEXTO ***/
  --fontSizeSmall: 0.8rem;
  --fontSizeMedium: 1rem;
  --fontSizeLarge: 1.2rem;
  --fontSizeHuge: 2rem;
  --lineHeightNatural: 1.2;
  --lineHeightLow: 1.1;

  /*** ESPACIOS ***/
  --spaceY: var(--fontSizeMedium);
  --spaceX: calc(var(--fontSizeMedium) * var(--lineHeightNatural));
  --rowGutterSmall: calc(var(--fontSizeSmall) * var(--lineHeightNatural));
  --rowGutterMedium: calc(var(--fontSizeMedium) * var(--lineHeightNatural));
  --rowGutterLarge: calc(var(--fontSizeLarge) * var(--lineHeightLow));
  --rowGutterBetweenSections: calc(var(--fontSizeLarge) * 2);
  --colGutter: var(--spaceX);

  /*** COLOR ***/
  --paletteWhite: #f5f5f5;
  --paletteGray: #999999;
  --paletteStone: #c0bdb6;   /* el gris cálido de la lista */
  --paletteViolet: #0202dc;
  --paletteInk: #111111;     /* el • y la → de los proyectos */
  --backColor: var(--paletteWhite);
  --textColor: var(--paletteStone);
  --hoverColor: var(--paletteViolet);
  --hoverBox: #cacaca;

  /*** DECORACIÓN ***/
  --borderLine: 0.1rem solid var(--textColor);
}

/*** TIPOGRAFÍAS ***/
@font-face {
  font-family: "Gerstner";
  src: url("../media/fonts/Gerstner-ProgrammRegular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gerstner";
  src: url("../media/fonts/Gerstner-ProgrammMedium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Gerstner";
  src: url("../media/fonts/Gerstner-ProgrammBold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/*** RESET ***/
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--textColor);
  background: var(--backColor);
  font-family: "Gerstner", sans-serif;
  font-size: var(--fontSizeMedium);
  line-height: var(--lineHeightNatural);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-size: inherit; font-weight: 400; }

a { color: inherit; text-decoration: none; }

img, video { display: block; max-width: 100%; height: auto; }

::selection { background: var(--paletteViolet); color: white; }

/* Foco visible solo con teclado */
:focus-visible { outline: 1px dotted var(--paletteViolet); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
