/* Palette from gofore.com (research §9). --accent is never used as a text color. */
:root {
  --deep: #0F3D51;
  --link: #007994;
  --accent: #F7673B;
  --text: #222222;
  --muted: #5F5F5F;
  --bg: #FFFFFF;
  --bg-alt: #F0F5F5;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

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

.wrap {
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

h1, h2, h3 { color: var(--deep); line-height: 1.25; }

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

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

/* Skip link: hidden until focused */
.skip {
  position: absolute;
  left: -999rem;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--deep);
}

/* Header */
.site-header {
  background: var(--deep);
  color: var(--bg);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}
.site-header a { color: var(--bg); text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.site-name { font-weight: 700; font-size: 1.125rem; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav [aria-current="page"] {
  padding-bottom: 0.125rem;
  border-bottom: 3px solid var(--accent);
}

.lang-switch { margin-left: auto; }

main {
  padding-block: 1.5rem 3rem;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer .wrap { padding-block: 1.5rem; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}

/* Profile */
.profile-head {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  align-items: center;
}
.profile-head h1 { margin: 0; }
/* Round frame that crops the 2:3 portrait to head and shoulders (research §1) */
.portrait {
  display: block;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  overflow: hidden;
}
.portrait img {
  display: block;
  width: 220%;
  max-width: none;
  height: auto;
  margin-left: -56%;
  margin-top: -44%;
}
.role { margin: 0.25rem 0; font-weight: 600; color: var(--deep); }
.summary { margin: 0.5rem 0 0; }
@media (max-width: 40rem) {
  .profile-head { grid-template-columns: 1fr; }
}

/* Pills: profile skills and project topics */
.skills, .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.skills li, .tags li {
  padding: 0.125rem 0.75rem;
  background: var(--bg-alt);
  color: var(--deep);
  border-radius: 1rem;
}

.entries { padding: 0; list-style: none; }
.entries li { margin-bottom: 1.25rem; }
.entries h3 { margin: 0; font-size: 1.0625rem; }
.meta { margin: 0.125rem 0; color: var(--muted); }

/* Print: the profile as a clean CV */
@media print {
  .skip, .site-nav, .lang-switch { display: none; }
  .site-header { background: none; color: #000; }
  .site-header a { color: #000; }
  /* Contact links stay printed through the profile's own contact section */
  .site-footer { display: none; }
  body, h1, h2, h3, .role, .meta, .skills li { color: #000; background: none; }
  a { color: #000; }
  .contact a[href^="http"]::after { content: " (" attr(href) ")"; }
  .entries li { break-inside: avoid; }
}

/* Lists of projects and publications */
.list article {
  padding-block: 1rem;
  border-bottom: 1px solid var(--bg-alt);
}
.list h2, .list h3 { margin: 0; font-size: 1.25rem; }
.list p { margin: 0.25rem 0; }

/* Small badges: language marker and "external" label */
.lang-marker, .label {
  display: inline-block;
  padding: 0 0.375rem;
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  color: var(--deep);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  vertical-align: middle;
}
.links a + a { margin-left: 1rem; }
.external-link { font-weight: 600; }
