/* =========================================================
   María Monegro — mariamonegro.com
   Plain CSS. Edit variables in :root to adjust the palette.
   ========================================================= */

/* ---------- Fonts (self-hosted, variable woff2) ---------- */

/* Upright: covers weights 400, 500, 600 via the variable font's wght axis.
   Served as two unicode-range subsets so the browser only downloads what
   it needs for the glyphs on the page. */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Italic: covers weights 400, 500. */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/eb-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  --paper:         #f4efe7;
  --paper-warm:    #ece5d8;
  --ink:           #1c1a17;
  --graphite:      #5a554d;
  --graphite-soft: #8a8378;
  --rule:          #d6cfc2;
  --accent:        #8a3a2a; /* quiet oxblood, like a pencil line over skin */
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

body {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: 0 32px 120px 32px;
}

/* Subtle paper grain overlay. Two offset radial-dot layers, multiplied. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: multiply;
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  z-index: 100;
  border-bottom: none;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Links ---------- */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, color .25s ease, opacity .25s ease;
}
a:hover { border-bottom-color: var(--ink); }

/* Visible focus for keyboard users only. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0 14px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  z-index: 10;
  gap: 16px;
}
.logo {
  font-size: 28px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
  /* Subtle typographic polish: enable discretionary ligatures and old-style
     figures (though the logo has none, this is inherited nowhere else). */
  font-feature-settings: "dlig" 1, "onum" 1;
}
.logo a { border-bottom: none; }
.logo a:hover { color: var(--accent); }

.nav {
  font-size: 17px;
  display: flex;
  gap: 22px;
  align-items: baseline;
  color: var(--graphite);
  flex-wrap: wrap;
}
.nav .arrow {
  color: var(--graphite-soft);
  margin-right: 4px;
}
.nav a.is-current {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.nav a.shop {
  /* External: give it a tiny visual anchor without making it loud. */
  color: var(--ink);
}
.nav a.shop:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Intro / statement ---------- */
.intro {
  padding: 64px 0 48px 0;
  max-width: 620px;
}
.intro p {
  font-size: 22px;
  line-height: 1.45;
  font-weight: 400;
}
.intro p + p { margin-top: 18px; }
.intro .lede {
  font-style: italic;
  font-size: 26px;
  line-height: 1.35;
  margin-bottom: 24px;
}

/* ---------- Section header ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 28px 0 18px 0;
  border-top: 1px solid var(--rule);
  margin-top: 64px;
}
.section-num {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--graphite-soft);
  letter-spacing: 0.08em;
}
.section-title {
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
}

/* ---------- Two-column layout (Profile / CV) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
}
.two-col h3 {
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
  margin-bottom: 14px;
}
.cv-block { margin-bottom: 36px; }
.cv-block p {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--ink);
}
.cv-block .year {
  display: inline-block;
  width: 64px;
  color: var(--graphite-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  font-size: 19px;
}
.contact-grid p { margin-bottom: 6px; }
.contact-grid .label {
  color: var(--graphite-soft);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--graphite-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-style: italic;
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  body { padding: 0 18px 80px 18px; font-size: 17px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .logo { font-size: 24px; }
  .nav { font-size: 15px; gap: 16px; }
  .intro { padding: 40px 0 32px 0; }
  .intro p { font-size: 19px; }
  .intro .lede { font-size: 22px; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 4px; }
}
