/* ==========================================================
   Inês Carvalho — personal site
   One stylesheet for every page. Colours and sizes live in the
   variables just below, so a change there changes the whole site.
   ========================================================== */

@font-face { font-family: "Fraunces"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("../fonts/fraunces-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --green: #1f3d36;
  --green-soft: #294d44;
  --sage: #a8beb0;
  --sage-tint: #e4ebe6;
  --paper: #f6f3ee;
  --card: #ffffff;
  --ink: #1b2623;
  --muted: #55625d;
  --line: #d9d6cf;
  --accent: #a8482a;      /* links and small highlights */
  --on-green: #f6f3ee;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 68rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #0f1d19;
    --green-soft: #1b332d;
    --sage: #9db5a6;
    --sage-tint: #1c2a26;
    --paper: #131b18;
    --card: #1a2420;
    --ink: #ece9e2;
    --muted: #a3afaa;
    --line: #2b3732;
    --accent: #e08a6a;
    --on-green: #f1eee8;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: var(--on-green); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.eyebrow { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }
.muted { color: var(--muted); }

/* ---------- Header / nav ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1.5rem; padding-block: .9rem; }
.brand { font: 600 1.3rem/1 var(--serif); color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--sage); }
.nav a[aria-current="page"] { border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font: 600 .95rem/1 var(--sans); padding: .95rem 1.4rem; border-radius: 999px; text-decoration: none;
  border: 2px solid var(--green); background: var(--green); color: var(--on-green); }
.btn:hover { background: var(--green-soft); border-color: var(--green-soft); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
@media (prefers-color-scheme: dark) {
  .btn { background: var(--sage); border-color: var(--sage); color: #10201b; }
  .btn:hover { background: #b6cabc; border-color: #b6cabc; }
  .btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
}
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 16ch; }
.portrait { position: relative; justify-self: center; width: min(100%, 22rem); }
.portrait::before { content: ""; position: absolute; inset: -1rem -1rem 2rem -1rem; border-radius: 999px 999px 0 0; background: var(--sage-tint); }
.portrait img { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%;
  border-radius: 999px 999px 10px 10px; background: var(--sage-tint); }

/* ---------- Sections ---------- */
section { padding-block: clamp(2.4rem, 5vw, 4rem); }
.band { background: var(--green); color: var(--on-green); }
.band .muted, .band .eyebrow { color: var(--sage); }
.band a { color: #f3c1ab; }
.section-head { max-width: 42rem; margin-bottom: 2rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { border-top: 2px solid var(--sage); padding-top: 1rem; }
.stat b { display: block; font: 600 clamp(1.7rem, 3.4vw, 2.5rem)/1.1 var(--serif); margin-bottom: .4rem; }
.stat span { font-size: .93rem; color: var(--sage); display: block; line-height: 1.45; }

.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-3px); border-color: var(--sage); }
a.card .more { color: var(--accent); font-weight: 600; font-size: .95rem; }
.tag { display: inline-block; font: 600 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  background: var(--sage-tint); color: var(--muted); padding: .4rem .65rem; border-radius: 999px; margin: 0 .35rem .35rem 0; }

ul.tidy { padding-left: 1.15rem; margin: 0 0 1em; }
ul.tidy li { margin-bottom: .45rem; }
ul.tidy li::marker { color: var(--sage); }

/* ---------- Pills (skills) ---------- */
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .95rem; font-size: .95rem; }

/* ---------- Timeline (experience) ---------- */
.job { display: grid; grid-template-columns: 11rem 1fr; gap: .5rem 2rem; padding-block: 1.8rem; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 0; }
.job .when { color: var(--muted); font-size: .95rem; padding-top: .3rem; }
.job h3 { margin-bottom: .15rem; }
.job .org { font-weight: 500; margin-bottom: .9rem; }

/* ---------- Case study ---------- */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.2rem; font-size: 1.6rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem 2rem; border-block: 1px solid var(--line); padding-block: 1.2rem; margin: 2rem 0; }
.facts dt { font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.facts dd { margin: 0; font-weight: 500; }
.crumb { font-size: .92rem; margin-bottom: 1.2rem; }

/* ---------- References ---------- */
.ref { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: start; }
.ref blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--sage); font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
.ref .meta { color: var(--muted); font-size: .93rem; }
.ref .btns { display: flex; flex-direction: column; gap: .6rem; min-width: 11rem; }
.ref .btn { text-align: center; padding: .8rem 1rem; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.contact-list li { display: grid; grid-template-columns: 7rem 1fr; gap: .2rem 1rem; align-items: baseline; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.contact-list .label { font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list span.v { font: 600 1.25rem/1.3 var(--serif); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; font-size: .92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; }
.site-footer a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(70%, 17rem); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cols-2 { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; }
  .ref { grid-template-columns: 1fr; }
  .ref .btns { flex-direction: row; flex-wrap: wrap; }
  .contact-list li { grid-template-columns: 1fr; }
  .site-header { position: static; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } a.card { transition: none; } }
@media print { .site-header, .site-footer, .actions { display: none; } body { background: #fff; color: #000; } }
