/* =========================================================
   Anya Nova Metcalfe — personal site
   Black on white, turquoise accent.
   ========================================================= */

:root {
  --ink:      #0a0a0a;
  --paper:    #ffffff;
  --grey:     #666360;
  --rule:     #e3e3e1;
  --wash:     #f6f6f5;
  --turq:     #12cbc4;
  --turq-deep:#0b8c88;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 90vw); margin-inline: auto; }
a { color: inherit; }

.mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sp { font-style: italic; }

/* turquoise keyword emphasis */
.key { color: var(--turq-deep); font-weight: 700; }

/* ---------- top nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0; gap: 1rem;
}
.brandmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brandmark::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--turq);
  border-radius: 50%;
  margin-left: 0.4rem;
  vertical-align: 0.1em;
}
.navlinks { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.navlinks a {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.navlinks a:hover { border-color: var(--turq); }

/* ---------- hero ---------- */
.hero { padding: 5rem 0 3rem; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}
@media (max-width: 820px){
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding: 3rem 0 2rem; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--turq-deep);
  margin: 0 0 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--turq);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0 0 1.4rem;
}

.hero-sub {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 1.6rem;
  font-weight: 500;
}
.hero-fine { color: var(--grey); max-width: 54ch; margin: 0 0 2rem; font-size: 0.98rem; line-height: 1.55; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0 0 2rem; }
.btn-cv, .btn-ghost {
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border: 2px solid var(--ink);
  transition: background 0.15s, color 0.15s;
}
.btn-cv { background: var(--ink); color: #fff; }
.btn-cv:hover { background: var(--turq); border-color: var(--turq); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--turq); border-color: var(--turq); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; color: var(--grey); }

/* portrait with offset turquoise block */
.portrait { position: relative; }
.portrait::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  background: var(--turq);
  z-index: 0;
}
.portrait img {
  position: relative; z-index: 1;
  display: block; width: 100%; height: auto;
  filter: none;
  transition: filter 0.5s ease;
}
@media (hover: hover) and (pointer: fine) {
  .portrait img { filter: grayscale(100%) contrast(1.08); }
  .portrait:hover img { filter: none; }
}
.portrait figcaption {
  position: relative; z-index: 1;
  color: var(--grey);
  padding-top: 0.7rem;
}

/* ---------- stat rail ---------- */
.rail {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.rail .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
}
@media (max-width: 720px){ .rail .wrap { grid-template-columns: repeat(2, 1fr); } }
.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat span { display: block; color: var(--grey); margin-top: 0.35rem; }

/* ---------- sections ---------- */
section { padding: 4.5rem 0; }
.section-label {
  color: var(--turq-deep);
  margin: 0 0 1.4rem;
  display: flex; align-items: center; gap: 0.85rem;
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 1.4rem;
}
.lede { font-size: 1.25rem; line-height: 1.5; max-width: 58ch; font-weight: 500; }
.prose p { max-width: 60ch; }
.prose p + p { margin-top: 1rem; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 760px){ .about { grid-template-columns: 1fr; gap: 1.5rem; } }

/* wide about photo, full bleed */
.about-photo { margin: 3.5rem 0 0; }
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: cover;
  border-top: 3px solid var(--turq);
  border-bottom: 3px solid var(--turq);
  filter: none;
  transition: filter 0.5s ease;
}
@media (hover: hover) and (pointer: fine) {
  .about-photo img { filter: grayscale(100%) contrast(1.06); }
  .about-photo:hover img { filter: none; }
}
.about-photo figcaption {
  color: var(--grey);
  padding-top: 0.8rem;
}

/* ---------- capability cards ---------- */
.caps { background: var(--wash); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 2.2rem;
}
@media (max-width: 800px){ .cap-grid { grid-template-columns: 1fr; } }
.cap {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--turq);
  padding: 1.6rem 1.4rem;
  transition: transform 0.18s, box-shadow 0.18s;
}
.cap:hover { transform: translateY(-4px); box-shadow: 0 10px 0 -2px var(--turq); }
.cap h3 {
  font-family: var(--display);
  font-weight: 700; font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.6rem;
}
.cap p { margin: 0 0 1rem; color: #333; font-size: 0.97rem; }
.cap ul { margin: 0; padding-left: 1.05rem; color: var(--grey); font-size: 0.9rem; }
.cap li { margin-bottom: 0.3rem; }
.cap li::marker { color: var(--turq); }

/* ---------- work list ---------- */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.work-item {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0 1.6rem 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: padding-left 0.18s;
}
.work-item::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--turq);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.18s;
}
.work-item:hover { padding-left: 1.1rem; }
.work-item:hover::before { transform: scaleY(1); }
.work-item .yr { color: var(--grey); padding-top: 0.3rem; }
.work-item h3 {
  font-family: var(--display);
  font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
}
.work-item .role { color: var(--turq-deep); margin: 0 0 0.5rem; }
.work-item p { margin: 0; max-width: 62ch; color: #333; }
@media (max-width: 620px){ .work-item { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- what's next (inverted) ---------- */
.next { background: var(--ink); color: #fff; }
.next h2, .next .lede { color: #fff; }
.next .section-label { color: var(--turq); }
.next .section-label::after { background: #333; }
.next-list {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: 2rem; padding: 0; list-style: none;
}
.next-list li {
  border: 1px solid #3a3a3a;
  padding: 0.6rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s;
}
.next-list li:hover { border-color: var(--turq); color: var(--turq); }
.next-note { color: #9c9c9c; margin-top: 2rem; max-width: 58ch; }

/* ---------- photo thumbs ---------- */
.thumbs { padding: 0 0 3rem; }
.thumbs-label { color: var(--grey); margin: 0 0 0.9rem; }
.thumbs-hint { color: var(--turq-deep); }
.thumb-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.thumb { margin: 0; width: 118px; }
.thumb-btn {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  width: 100%;
}
.thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 2px solid var(--turq);
  filter: none;
  transition: filter 0.4s ease, transform 0.2s ease;
}
.thumb figcaption {
  color: var(--grey);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  padding-top: 0.4rem;
}
@media (hover: hover) and (pointer: fine) {
  .thumb-btn img { filter: grayscale(100%) contrast(1.06); }
  .thumb-btn:hover img { filter: none; transform: translateY(-3px); }
}
.thumb-btn:focus-visible { outline: 3px solid var(--turq); outline-offset: 3px; }
@media (max-width: 520px){
  .thumb { width: calc(50% - 0.45rem); }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-inner {
  margin: 0;
  max-width: 900px;
  cursor: default;
}
.lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  border: 3px solid var(--turq);
}
.lightbox-inner figcaption {
  color: #cfcfcf;
  text-align: center;
  padding-top: 0.9rem;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  transition: color 0.15s;
}
.lightbox-close:hover { color: var(--turq); }
.lightbox-close:focus-visible { outline: 3px solid var(--turq); outline-offset: 2px; }

/* ---------- teaser cta ---------- */
.teaser-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  text-decoration: none;
  border-bottom: 2px solid var(--turq);
  padding-bottom: 0.25rem; margin-top: 1.2rem;
  transition: gap 0.18s;
}
.teaser-cta:hover { gap: 0.95rem; }

/* ---------- footer ---------- */
footer { border-top: 2px solid var(--ink); padding: 3rem 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.9rem 1.8rem; margin: 1.2rem 0; }
.contact-links a {
  text-decoration: none;
  border-bottom: 2px solid var(--turq);
  padding-bottom: 2px;
}
.contact-links a:hover { color: var(--turq-deep); }
.footer-note { color: var(--grey); margin-top: 1.4rem; }

/* =========================================================
   Publications page
   ========================================================= */
.pub-hero { padding: 3.5rem 0 2.5rem; border-bottom: 2px solid var(--ink); }
.pub-hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.045em;
  margin: 0.9rem 0 0.7rem;
}
.pub-hero p { max-width: 58ch; color: var(--grey); margin: 0; }
.pub-hero p a { color: var(--turq-deep); }
.back-link {
  font-family: var(--mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  text-decoration: none; color: var(--grey);
}
.back-link:hover { color: var(--turq-deep); }

.pub-group { padding: 4rem 0 1.5rem; }
.pub-group h2 { font-size: 1.7rem; margin: 0 0 0.4rem; }
.pub-group .count { color: var(--turq-deep); margin: 0 0 2.4rem; }

.pub-list { margin: 0; padding: 0; }
.pub { max-width: 74ch; margin-bottom: 2.6rem; }
.pub p { margin: 0; }
.pub .ptitle {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}
.pub .ptitle a { text-decoration: none; border-bottom: 2px solid var(--turq); }
.pub .ptitle a:hover { color: var(--turq-deep); }
.pub .pauthors { color: var(--grey); font-size: 0.9rem; line-height: 1.5; }
.pub .pauthors b { color: var(--ink); font-weight: 600; }
.pub .pmeta { color: var(--grey); font-size: 0.9rem; margin-top: 0.15rem; }

/* =========================================================
   Contact page
   ========================================================= */
.contact-page { padding: 3.5rem 0 4rem; }
.contact-grid {
  display: grid; grid-template-columns: 0.95fr 1.05fr;
  gap: 3.5rem; align-items: start;
}
@media (max-width: 800px){ .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.email-card {
  background: var(--wash);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--turq);
  padding: 1.4rem;
}
.email-big {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  word-break: break-all;
  display: inline-block;
  border-bottom: 2px solid var(--turq);
}
.email-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.btn-copy, .btn-mail {
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6rem 0.95rem; cursor: pointer; text-decoration: none;
  border: 2px solid var(--ink);
  transition: background 0.15s, border-color 0.15s;
}
.btn-copy { background: var(--ink); color: #fff; }
.btn-copy:hover { background: var(--turq); border-color: var(--turq); color: var(--ink); }
.btn-mail { background: transparent; color: var(--ink); }
.btn-mail:hover { background: var(--turq); border-color: var(--turq); }

.detail-list { margin: 2rem 0 0; }
.detail-list > div {
  display: grid; grid-template-columns: 7.5rem 1fr;
  gap: 1rem; padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}
.detail-list dt { color: var(--turq-deep); }
.detail-list dd { margin: 0; font-size: 0.96rem; }
.detail-list a { text-decoration: none; border-bottom: 2px solid var(--turq); }

.contact-form { display: flex; flex-direction: column; }
.contact-form label { color: var(--turq-deep); margin-bottom: 0.4rem; }
.contact-form label:not(:first-of-type) { margin-top: 1.2rem; }
.contact-form input,
.contact-form textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--ink);
  padding: 0.7rem 0.8rem; width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--turq);
  box-shadow: 0 0 0 3px rgba(18, 203, 196, 0.25);
}
.contact-form textarea { resize: vertical; }
.btn-send {
  font-family: var(--body); font-weight: 700; font-size: 1rem;
  background: var(--ink); color: #fff;
  border: 2px solid var(--ink);
  padding: 0.85rem 1.4rem; margin-top: 1.6rem;
  cursor: pointer; align-self: flex-start;
  transition: background 0.15s, color 0.15s;
}
.btn-send:hover { background: var(--turq); border-color: var(--turq); color: var(--ink); }
.form-note { color: var(--grey); margin: 1rem 0 0; text-transform: none; letter-spacing: 0.02em; }

/* ---------- a11y ---------- */
a:focus-visible, button:focus-visible, .navlinks a:focus-visible {
  outline: 3px solid var(--turq); outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
