/* =========================================================
   Mia Damen-Soko — site styles
   Plain HTML/CSS version.
   Values match the original exactly; edit the variables
   below to change colours site-wide.
   ========================================================= */

:root {
  --background: hsl(60 23% 99%);  /* off-white page */
  --foreground: hsl(0 0% 10%);    /* body text */
  --muted: hsl(0 0% 42%);         /* captions */
  --link: hsl(352 60% 30%);       /* dark red links */
  --link-hover: hsl(0 0% 10%);
  --meta: #b04a62;                /* pink: nav, years, schemes, footer */
  --border: hsl(0 0% 88%);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--border);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  margin: 0;
}

h1, h2, h3, h4, p, figure, ul {
  margin: 0;
}

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

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

/* ---------- Base typography ---------- */

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Metrophobic', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Pixelify Sans', 'Metrophobic', sans-serif;
}

h1 { font-size: 40px; line-height: 1.25; font-weight: 600; }
h2 { font-size: 28px; line-height: 1.3; font-weight: 600; margin-top: 2.25rem; margin-bottom: 0.75rem; }
h3 { font-size: 22px; font-weight: 600; }

p { margin-bottom: 1rem; }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* ---------- Shared bits ---------- */

.meta { color: var(--meta); }

.caption {
  font-size: 0.875rem;
  line-height: 1.25rem;
  margin-top: 0.5rem;
  color: var(--muted);
}

/* ---------- Page layout (nav, main, footer) ---------- */

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.site-header {
  margin-bottom: 3rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
}

.site-nav a,
.site-nav a:hover {
  color: var(--meta);
}

.site-nav a.active {
  font-weight: 600;
}

.site-footer {
  margin-top: 5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--meta);
}

@media (min-width: 768px) {
  .page {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* ---------- Home ---------- */

.intro {
  display: flex;
  flex-direction: column-reverse;
  gap: 1.5rem;
}

.intro-text {
  flex: 1 1 0%;
}

.intro-text h1 {
  margin-bottom: 1.5rem;
}

.portrait img {
  width: 10rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

@media (min-width: 768px) {
  .intro {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }

  .portrait {
    width: 11rem;
    flex-shrink: 0;
  }

  .portrait img {
    width: 11rem;
  }
}

/* ---------- Page headings ---------- */

/* Heading sizes are the same everywhere; only the gap below differs. */
.heading-lg { margin-bottom: 2rem; }    /* Research, Visuals, Writing */
.heading-md { margin-bottom: 1.5rem; }  /* Home, Contact */
.heading-sm { margin-bottom: 1rem; }    /* Page not found */

/* ---------- Research ---------- */

.interests {
  list-style: disc;
  padding-left: 1.25rem;
}

.interests > li + li,
.contact-links > li + li {
  margin-top: 0.25rem;
}

.projects > li + li {
  margin-top: 2rem;
}

.project-scheme {
  margin-bottom: 0.25rem;
}

.project-title {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 22px;
}

.project-year {
  font-weight: 400;
}

/* last paragraph of a summary sits closer to its links */
.project-summary-last {
  margin-bottom: 0.25rem;
}

.project-links {
  margin-bottom: 0;
}

/* ---------- Individual project pages ---------- */

.back-link {
  font-size: 1rem;
  line-height: 1.5rem;
}

.project-page h1 {
  margin-bottom: 0.25rem;
}

.project-subtitle {
  font-size: 20px;
  font-style: italic;
  margin-bottom: 0.25rem;
}

/* ---------- Visuals ---------- */

.visual-group {
  scroll-margin-top: 2rem;
}

.visual-group h2 {
  overflow-wrap: break-word;
}

.visual {
  margin: 0 0 2rem;
}

.visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Writing ---------- */

.first-heading {
  margin-top: 0;
}

.publications > li + li {
  margin-top: 0.75rem;
}

/* ---------- Pixel-art cursors (Pixelarticons, stored locally) ---------- */
/* The numbers are the click point inside each 32×32 image.
   No dark-mode variants: the site has no dark mode. */

body {
  cursor: url('../assets/cursor-default.png') 6 4, default;
}

a,
button {
  cursor: url('../assets/cursor-pointer.png') 12 4, pointer;
}

/* Text read out by screen readers but not shown on screen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
