/* Alice Hamilton Farmer — single stylesheet.
   Ocean palette: her current work concerns coastal and small-scale fishing
   communities displaced by climate change. System fonts only — zero font bytes. */

/* Self-hosted so there is no third-party request and no dependency on a font CDN.
   DM Sans is variable, so one file covers every weight used. */
@font-face {
  font-family: "DM Serif Display";
  src: url("fonts/dm-serif-display-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --abyss:   #062334;
  --deep:    #0d3b52;
  --sea:     #14607f;
  --wave:    #2e8fa8;
  --shallow: #7fc4d4;
  --foam:    #dceef2;
  --mist:    #eef6f8;
  --paper:   #fbfdfd;
  --ink:     #12303f;
  --muted:   #5c7a89;
  --rule:    #cfe3ea;
  --serif: "DM Serif Display", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 50rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

a { color: var(--sea); text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--deep); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--wave); outline-offset: 3px; border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--abyss); color: #fff; padding: .7rem 1rem; text-decoration: none; }
.skip:focus { left: 0; }

/* ---------- header ---------- */

.site-header { background: var(--abyss); color: var(--foam); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-block: 1.2rem;
}
.wordmark {
  font-family: var(--serif); font-size: 1.15rem; letter-spacing: .01em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--shallow); }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 1.15rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--shallow); text-decoration: none; font-size: .89rem; letter-spacing: .02em; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--wave); }

.nav-toggle { display: none; }

@media (max-width: 46rem) {
  .nav-toggle {
    display: block; width: 2.6rem; height: 2.6rem; background: none;
    border: 1px solid rgba(255,255,255,.28); border-radius: 3px;
    cursor: pointer; position: relative; padding: 0;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; position: absolute; left: 50%; width: 1.1rem; height: 1.5px;
    background: var(--foam); transform: translateX(-50%);
  }
  .nav-toggle-bar { top: 50%; }
  .nav-toggle-bar::before { top: -6px; left: 0; transform: none; }
  .nav-toggle-bar::after  { top:  6px; left: 0; transform: none; }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-top: .5rem; }
  .site-nav li { border-top: 1px solid rgba(255,255,255,.14); }
  .site-nav a { display: block; padding: .8rem .2rem; font-size: 1rem; }
}

/* ---------- hero (home) ---------- */

.hero {
  background: linear-gradient(175deg, var(--abyss) 0%, var(--deep) 45%, var(--sea) 100%);
  color: #fff; position: relative;
  padding-block: clamp(3rem, 9vw, 5.5rem) clamp(4rem, 9vw, 6rem);
  margin-bottom: 0;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: var(--paper);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34 q75 -30 150 0 t150 0 t150 0 t150 0 t150 0 t150 0 t150 0 t150 0 V60 H0 Z' fill='%23fff'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34 q75 -30 150 0 t150 0 t150 0 t150 0 t150 0 t150 0 t150 0 t150 0 V60 H0 Z' fill='%23fff'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.hero-inner {
  display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem);
}
.hero-portrait {
  flex: 0 0 auto;
  width: clamp(7rem, 17vw, 12rem);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, .34);
  outline: 1px solid rgba(255, 255, 255, .18);
  outline-offset: -1px;
}
/* min-width:0 lets this shrink inside the flex row; without it a long name
   overflows, widens the document and pushes the menu button off-screen. */
.hero-text { min-width: 0; flex: 1 1 auto; }

.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.1rem, 1.2rem + 3.8vw, 3.9rem);
  line-height: 1.02; margin: 0 0 .55rem; letter-spacing: -.015em; color: #fff;
  text-wrap: balance; overflow-wrap: break-word;
}
.hero .tagline {
  color: var(--shallow); font-size: .88rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; margin: 0;
}
.hero .themes {
  margin: 1.35rem 0 0; font-family: var(--serif);
  font-size: clamp(1rem, .92rem + .45vw, 1.28rem);
  color: var(--foam); line-height: 1.45; max-width: 34rem;
}

@media (max-width: 34rem) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .hero-portrait { width: 7.5rem; }
  /* stretch to the container, or the text sizes to its own content and overflows */
  .hero-text { width: 100%; }
  .hero h1 { font-size: clamp(1.9rem, 1.1rem + 4.6vw, 2.6rem); }
  .hero .themes { font-size: 1rem; }
}

/* ---------- section headings ---------- */

h2.section-heading {
  font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
  color: var(--deep); margin: 3.2rem 0 0; padding-bottom: .45rem;
  position: relative;
}
h2.section-heading::after {
  content: ""; display: block; height: 3px; width: 3.5rem; margin-top: .5rem;
  background: linear-gradient(90deg, var(--wave), var(--shallow));
  border-radius: 2px;
}

.page-header { padding-block: clamp(2rem, 6vw, 3rem) .25rem; }
.page-header h1 {
  font-family: var(--serif); font-weight: 400; color: var(--abyss);
  font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.5rem);
  margin: 0 0 .5rem; letter-spacing: -.015em;
}
.page-header p { color: var(--muted); margin: 0; max-width: 38rem; }

/* ---------- filter ---------- */

.filter { margin-block: 1.6rem .25rem; }
.filter input {
  width: 100%; padding: .65rem .8rem;
  border: 1px solid var(--rule); border-radius: 4px;
  background: #fff; color: inherit; font: inherit; font-size: .95rem;
}
.filter input::placeholder { color: #93aab5; }
.filter-status { color: var(--muted); font-size: .85rem; margin: .4rem 0 0; min-height: 1.2em; }
.filter-empty { color: var(--muted); font-style: italic; padding: 2rem 0; }

/* ---------- entry lists ---------- */

.year-group { margin-top: 2.2rem; }
.year {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; color: var(--wave);
  margin: 0 0 .8rem; padding-bottom: .3rem; border-bottom: 1px solid var(--rule);
}

.entries { list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid; grid-template-columns: 84px 1fr; gap: 1.15rem;
  padding-block: 1.25rem; border-bottom: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 0; }

.entry-thumb {
  display: block; width: 84px; height: 109px; object-fit: cover;
  border-radius: 3px; background: var(--mist);
  box-shadow: 0 1px 4px rgba(6,35,52,.16);
}
.entry-body { min-width: 0; }

.entry-label {
  display: block; font-size: .7rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--wave); margin: 0 0 .25rem;
}
.entry-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.15rem; line-height: 1.34; margin: 0 0 .3rem;
}
.entry-title a { color: var(--abyss); text-decoration: none; }
.entry-title a:hover { color: var(--sea); text-decoration: underline; }

.entry-meta { margin: 0; color: var(--muted); font-size: .89rem; }
.entry-meta span + span::before { content: " · "; }
.entry-meta .status { color: var(--wave); font-weight: 600; }

.entry-note { margin: .45rem 0 0; font-size: .92rem; color: #3c5a68; max-width: 40rem; }

.entry-links { margin: .5rem 0 0; }
.entry-links .pdf {
  display: inline-block; font-size: .72rem; letter-spacing: .07em; font-weight: 600;
  text-decoration: none; color: var(--sea);
  border: 1px solid var(--rule); border-radius: 3px; padding: .18rem .55rem;
  background: var(--mist);
}
.entry-links .pdf:hover { color: #fff; background: var(--sea); border-color: var(--sea); }

@media (max-width: 34rem) {
  .entry { grid-template-columns: 60px 1fr; gap: .85rem; }
  .entry-thumb { width: 60px; height: 78px; }
  .entry-title { font-size: 1.06rem; }
}

/* ---------- about block on home ---------- */

.about-block { margin-top: 1rem; }
.about-block p { max-width: 38rem; }
.buttons { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.btn {
  display: inline-block; text-decoration: none; font-size: .9rem; font-weight: 600;
  padding: .6rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--sea);
}
.btn-solid { background: var(--sea); color: #fff; }
.btn-solid:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn-ghost { color: var(--sea); background: transparent; }
.btn-ghost:hover { background: var(--mist); color: var(--deep); }

.currently {
  border-left: 3px solid var(--wave); background: var(--mist);
  padding: .9rem 1.1rem; color: var(--deep); font-size: 1rem;
  margin-block: 2.5rem 0; border-radius: 0 4px 4px 0;
}

/* ---------- prose (About page) ---------- */

.prose { padding-block: 1rem 2rem; }
.prose h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.35rem;
  color: var(--deep); margin: 2.4rem 0 .6rem;
}
.prose p, .prose ul { max-width: 38rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: .4rem; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 4rem; background: var(--abyss); color: var(--shallow);
  padding-block: 2rem 2.5rem; font-size: .87rem;
}
.site-footer .wordmark-footer {
  font-family: var(--serif); font-size: 1.05rem; color: #fff; display: block; margin-bottom: .4rem;
}
.site-footer p { margin: 0 0 .3rem; }
.footer-links a { color: var(--shallow); margin-right: 1rem; }
.footer-links a:hover { color: #fff; }
