:root {
  color-scheme: light dark;
  --blue: #1746d1;
  --blue-strong: #0d2f9e;
  --navy: #101a3a;
  --pale-blue: #e7efff;
  --near-white: #f8faff;
  --line: #c7d4f1;
  --muted: #405178;
  --surface: #ffffff;
  --sans: "Instrument Sans", Arial, Helvetica, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  color: var(--navy);
  background: var(--near-white);
  font-family: var(--sans);
  font-synthesis: none;
  line-height: 1.5;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-width: 320px;
  margin: 0;
  background: var(--near-white);
  color: var(--navy);
}
a {
  color: inherit;
}
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 2;
  padding: 0.65rem 0.85rem;
  background: var(--navy);
  color: var(--near-white);
}
.skip-link:focus {
  top: 1rem;
}
.page {
  width: min(calc(100% - 32px), 40rem);
  margin-inline: auto;
}

.profile {
  padding: 30px 0 18px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 13px;
}
.monogram {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.07em;
}
.profile h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
.profile p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.utility-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: 17px 0 0 67px;
  color: var(--blue-strong);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-transform: uppercase;
}
.utility-link:hover {
  color: var(--blue);
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
}
.anchor-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: var(--blue-strong);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.anchor-nav a:hover {
  border-color: var(--blue);
  background: var(--pale-blue);
}

.link-section {
  padding-top: 28px;
  scroll-margin-top: 16px;
}
.section-anchor {
  display: block;
  height: 0;
  scroll-margin-top: 16px;
}
.link-section + .link-section {
  margin-top: 33px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 13px;
}
.section-label h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  letter-spacing: -0.025em;
}
.section-label span {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.entry {
  margin-top: 10px;
}
.primary-link {
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--blue);
  background: var(--surface);
  color: var(--navy);
  text-decoration: none;
}
.primary-link:hover {
  border-color: var(--blue-strong);
  background: var(--pale-blue);
}
.primary-link--static {
  border-color: var(--line);
  cursor: default;
}
.primary-link--static:hover {
  border-color: var(--line);
  background: var(--surface);
}
.link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.link-copy strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.link-copy small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}
.link-status {
  color: var(--blue-strong);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}
.link-arrow {
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
}
.secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 8px 0;
}
.secondary-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--blue-strong);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}
.secondary-links a:hover {
  color: var(--blue);
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 45px;
  padding: 19px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--blue-strong);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Dedicated legacy project page */
.project-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--blue-strong);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.back-link:hover {
  color: var(--blue);
}
.project-tag {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.notice-banner {
  margin-top: 18px;
  padding: 17px 18px;
  border-left: 5px solid var(--blue);
  background: var(--pale-blue);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}
.project-intro {
  padding: 45px 0 31px;
}
.project-intro .eyebrow {
  margin: 0 0 11px;
  color: var(--blue-strong);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-intro h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.8rem, 12vw, 5.2rem);
  letter-spacing: -0.08em;
  line-height: 0.91;
}
.project-intro h1 em {
  color: var(--blue);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.project-dek {
  max-width: 34rem;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.project-record {
  padding: 27px 0 60px;
  border-top: 1px solid var(--line);
}
.project-record h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.project-record p {
  max-width: 34rem;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.project-record .primary-link {
  max-width: 34rem;
}

@media (max-width: 520px) {
  .page {
    width: min(calc(100% - 24px), 40rem);
  }
  .profile {
    padding-top: 23px;
  }
  .primary-link {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }
  .link-status {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }
  .link-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .project-header {
    min-height: 60px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #8eb0ff;
    --blue-strong: #c3d4ff;
    --navy: #f1f5ff;
    --pale-blue: #1a2b59;
    --near-white: #101a3a;
    --line: #40558c;
    --muted: #bdc9e6;
    --surface: #17244b;
  }
  .monogram {
    background: #1746d1;
    color: #fff;
  }
  .primary-link {
    border-color: var(--blue);
  }
  .primary-link:hover {
    background: var(--pale-blue);
  }
  .primary-link--static,
  .primary-link--static:hover {
    border-color: var(--line);
    background: var(--surface);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
