/* luizfnunesdasilva.studio — one stylesheet, no build, no dependency.
   Single source for both language pages: a duplicated stylesheet drifts,
   and drift is the subject of this site. */

:root {
  color-scheme: light dark;

  --ink:        #0a0a0b;
  --ink-muted:  #2e2e33;
  --ink-faint:  #56565d;
  --paper:      #fefefd;
  --rule:       #cfccc5;
  --focus:      #0a0a0b;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #f7f5f0;
    --ink-muted:  #d3d0c9;
    --ink-faint:  #a9a69f;
    --paper:      #0b0b0c;
    --rule:       #3a3a41;
    --focus:      #f7f5f0;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.42vw, 1.1875rem);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.25rem 1.375rem 4rem;
}

@media (min-width: 40em) {
  .page { padding: 5.5rem 2rem 7rem; }
}

/* ---------- links ---------- */

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.18em;
  /* the underline is the only thing distinguishing a link from body text,
     so it carries its own contrast — --rule is too faint to qualify */
  text-decoration-color: var(--ink-faint);
  transition: text-decoration-color 120ms linear;
}

a:hover { text-decoration-color: currentColor; }

a:focus-visible,
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- language switch ---------- */

.lang {
  margin: 0 0 3.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lang a { color: var(--ink-muted); }

/* ---------- masthead ---------- */

h1 {
  margin: 0 0 1.25rem;
  font-weight: 700;
  font-size: clamp(1.9rem, 1.42rem + 2.2vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 2rem;
  font-weight: 500;
  font-size: clamp(1.1875rem, 1.08rem + 0.55vw, 1.375rem);
  line-height: 1.48;
  text-wrap: pretty;
}

.identity {
  margin: 0 0 3.5rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.identity p { margin: 0 0 0.35rem; }
.identity p:last-child { margin-bottom: 0; }

/* ---------- sections ---------- */

section { margin: 0 0 3.25rem; }

h2 {
  margin: 0 0 1.375rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- published works ---------- */

.works li { margin: 0 0 1.75rem; }
.works li:last-child { margin-bottom: 0; }

.works .title { display: block; }

.works .note {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.id {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

/* ---------- plain lists (method, subjects) ---------- */

.lines li {
  margin: 0 0 0.9rem;
  padding-left: 1.1rem;
  position: relative;
}

.lines li:last-child { margin-bottom: 0; }

.lines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.45rem;
  height: 1px;
  background: var(--rule);
}

/* ---------- contact ---------- */

.contact a {
  font-family: var(--mono);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* ---------- colophon ---------- */

footer {
  margin-top: 4.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 0.875rem;
  line-height: 1.6;
}

footer p { margin: 0 0 0.5rem; }
footer p:last-child { margin-bottom: 0; }

footer a { color: var(--ink-muted); }

.updated {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
