/* Adam Martin — sobrio, editorial; sin ornamentación tipo “plantilla IA” */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-v23-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-v23-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-v23-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-v26-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/newsreader-v26-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/newsreader-v26-latin-600.woff2") format("woff2");
}

:root {
  --paper: #f7f5f2;
  --paper-2: #efede9;
  --ink: #1a1917;
  --ink-muted: #5c5854;
  --rule: #d4d0c8;
  --rule-strong: #b8b3a8;
  --link: #1e4a5f;
  --link-hover: #0f3345;
  --focus: #1e4a5f;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-serif: "Newsreader", "Georgia", serif;
  --measure: 38rem;
  --max: 52rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--link-hover);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Cabecera —— */
.site-header {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--rule-strong);
}

.site-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-domain {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.site-header h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 4vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.site-role {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  max-width: 16rem;
  text-align: right;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .site-role {
    text-align: left;
    max-width: none;
  }
}

/* —— Principal —— */
main {
  padding: 2.5rem 0 3.5rem;
}

.intro {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .intro {
    grid-template-columns: 7.5rem 1fr;
    gap: 2rem 2.25rem;
    align-items: start;
  }
}

.intro__photo {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.intro__photo img {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
}

.intro__text h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.intro__text p {
  margin: 0;
  color: var(--ink);
  max-width: var(--measure);
  hyphens: auto;
}

.intro__text strong {
  font-weight: 600;
}

.intro__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--link);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.intro__social:hover {
  color: var(--link-hover);
  border-color: var(--rule-strong);
  background: rgba(255, 255, 255, 0.7);
}

.intro__social:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.intro__social svg {
  flex-shrink: 0;
}

/* —— Proyectos: listado tipo directorio —— */
.projects h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}

.project-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

@media (min-width: 540px) {
  .project-row {
    grid-template-columns: 5rem 1fr auto;
    align-items: center;
    gap: 1.25rem 1.5rem;
  }
}

.project-row:hover {
  background-color: rgba(255, 255, 255, 0.55);
}

.project-row:focus {
  outline: none;
}

.project-row:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  position: relative;
  z-index: 1;
}

.project-row__thumb img {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.project-row__body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.project-row__body p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 36rem;
}

.project-row__url {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--link);
  white-space: nowrap;
  align-self: center;
}

@media (max-width: 539px) {
  .project-row__url {
    grid-column: 2;
    margin-top: 0.15rem;
  }
}

.project-row:hover .project-row__url {
  text-decoration: underline;
}

/* —— Pie —— */
.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 500;
}
