/* ===========================================================
   Ignacio Lepe — personal site
   Matches the "Bjork" theme look: Albert Sans, #111 on white,
   minimal, underlined plain links. No build step, no deps.
   =========================================================== */

@font-face {
  font-family: "Albert Sans";
  src: url("../assets/fonts/AlbertSans-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Albert Sans";
  src: url("../assets/fonts/AlbertSans-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  --content: 720px;
  --text:  #111111;
  --muted: #6b6a6a;
  --line:  #e2e2e2;
  --wash:  #f3f2f2;
  --bg:    #ffffff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Albert Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 21px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 24px; }

/* Links — inherit color, underlined, hover removes underline (Bjork style) */
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }

/* ---------- Masthead ---------- */
.masthead { padding: 28px 0 12px; }
.masthead .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 18px; }
.nav a:hover, .nav a.active { color: var(--text); }

.social { display: flex; gap: 15px; align-items: center; }
.social a { color: var(--muted); display: inline-flex; text-decoration: none; }
.social a:hover { color: var(--text); }
.social svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- Main ---------- */
main { padding: 20px 0 8px; }

/* Page hero — faded photo banner */
.pagehero {
  position: relative;
  background-color: #16203a;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  padding: 66px 0; min-height: 230px;
  display: flex; align-items: center;
}
.pagehero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,17,34,0.38), rgba(12,17,34,0.64));
}
.pagehero .wrap { position: relative; z-index: 1; }
.pagehero h1 {
  color: #fff; font-size: 46px; line-height: 1.08; margin: 0; letter-spacing: -0.02em;
  text-shadow: 0 2px 22px rgba(0,0,0,0.35);
}
.pagehero .pagehero-sub {
  color: rgba(255,255,255,0.92); font-size: 19px; line-height: 1.45; margin: 12px 0 0; max-width: 40em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.pagehero .pagehero-sub a { color: #fff; }
.portrait { display: block; margin: 36px auto; max-width: 360px; width: 100%; height: auto; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.bio p { margin: 0 0 1em; }
.meta-line { margin-top: 1.5em; color: var(--muted); font-size: 18px; }

/* Research / content lists — bold labels + plain paragraphs */
.label { font-size: 21px; font-weight: 700; margin: 1.9em 0 0.55em; }
.label:first-of-type { margin-top: 0.4em; }
.entry { margin: 0 0 1.05em; }

.entry p { margin: 0; }

/* Expandable abstract */
details.abs { margin-top: 0.35em; }
details.abs > summary {
  cursor: pointer; color: var(--muted); font-size: 16px; list-style: none;
  display: inline-flex; align-items: center; gap: 0.35em; user-select: none;
}
details.abs > summary::-webkit-details-marker { display: none; }
details.abs > summary::before { content: "\25B8"; font-size: 0.8em; }
details.abs[open] > summary::before { content: "\25BE"; }
details.abs > summary:hover { color: var(--text); }
details.abs .abstract {
  font-size: 17px; line-height: 1.55; color: var(--text); margin-top: 0.6em;
  padding-left: 0.9em; border-left: 2px solid var(--line);
}

/* Tools */
.subtle { color: var(--muted); font-size: 18px; margin-top: 1.1em; }
.tool { margin: 0 0 0.4em; }

.feature-list { margin: 0.7em 0 1.2em; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 1.2em; margin: 0.35em 0; font-size: 18px; line-height: 1.5; }
.feature-list li::before { content: "\2022"; position: absolute; left: 0.1em; color: var(--muted); }
.feature-list strong { font-weight: 600; }

pre.example {
  background: var(--wash); border: 1px solid var(--line); border-radius: 8px;
  padding: 15px 18px; margin: 0.4em 0 1.2em; overflow-x: auto;
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px; line-height: 1.5; color: var(--text); white-space: pre;
}
p code, li code {
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85em; background: var(--wash); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  color: var(--text); text-decoration: none; font-size: 17px; font-weight: 500;
  padding: 9px 18px; border-radius: 7px; border: 1px solid var(--text);
}
.btn:hover { background: var(--text); color: #fff; text-decoration: none; }

/* Citation code boxes */
.codebox { position: relative; margin: 0 0 0.9em; }
.codebox .apa,
.codebox .bibtex {
  background: var(--wash); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 72px 14px 16px; margin: 0; color: var(--text);
}
.codebox .apa { font-size: 16px; line-height: 1.55; }
.codebox .bibtex {
  font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px; line-height: 1.5; overflow-x: auto; white-space: pre;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-family: inherit; font-size: 13px; padding: 3px 10px;
  cursor: pointer; line-height: 1.4;
}
.copy-btn:hover { color: var(--text); border-color: var(--muted); }

/* Insights figure */
figure.insight { margin: 0 0 1em; }
figure.insight img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 8px;
}
figure.insight figcaption {
  color: var(--muted); font-size: 15px; line-height: 1.55; margin-top: 0.7em;
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 22px 0 44px; color: var(--muted); font-size: 16px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot .social svg { width: 17px; height: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  body { font-size: 18px; }
  .hero-banner { padding: 32px 22px; }
  .hero-banner h1 { font-size: 26px; }
  .label { font-size: 19px; }
}
