@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-latin-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #12130f;
  --bg-elev: #1c1e19;
  --ink: #f3f1eb;
  --muted: #b4afa4;
  --line: #31342c;
  --accent: #e59262;
  --accent-ink: #1c120c;
  --header: rgba(18, 19, 15, 0.9);
  --glow: rgba(229, 146, 98, 0.18);
  --header-offset: 7.4rem;
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f3f0e8;
    --bg-elev: #fffcf7;
    --ink: #1c1b17;
    --muted: #5c574e;
    --line: #ddd6c8;
    --accent: #a3471c;
    --accent-ink: #fffaf6;
    --header: rgba(243, 240, 232, 0.9);
    --glow: rgba(163, 71, 28, 0.12);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12130f;
  --bg-elev: #1c1e19;
  --ink: #f3f1eb;
  --muted: #b4afa4;
  --line: #31342c;
  --accent: #e59262;
  --accent-ink: #1c120c;
  --header: rgba(18, 19, 15, 0.9);
  --glow: rgba(229, 146, 98, 0.18);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0e8;
  --bg-elev: #fffcf7;
  --ink: #1c1b17;
  --muted: #5c574e;
  --line: #ddd6c8;
  --accent: #a3471c;
  --accent-ink: #fffaf6;
  --header: rgba(243, 240, 232, 0.9);
  --glow: rgba(163, 71, 28, 0.12);
}

@media (min-width: 760px) {
  :root {
    --header-offset: 5.1rem;
    --gutter: 2rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 430;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1, h2, h3, h4, p {
  text-wrap: pretty;
}

h1, h2, .bot h4, .supervisor h3 {
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  font-weight: 580;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--wrap), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker .dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand toggle"
    "nav nav";
  align-items: center;
  gap: 0.15rem 0.75rem;
  min-height: 4.25rem;
  padding-block: 0.7rem;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-height: 2.75rem;
}

.brand-mark {
  width: 1.45rem;
  height: 1.45rem;
  flex: none;
}

.brand-mark .mark-bar {
  fill: var(--accent);
}

.brand-mark .mark-stem {
  fill: var(--ink);
}

.brand span {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 0.45rem;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.theme-toggle {
  grid-area: toggle;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.icon-sun,
.icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun,
:root:not([data-theme]) .icon-sun {
  display: block;
}

:root[data-theme="light"] .icon-moon {
  display: block;
}

:root[data-theme="light"] .icon-sun {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-sun {
    display: none;
  }

  :root:not([data-theme]) .icon-moon {
    display: block;
  }
}

.hero {
  position: relative;
  z-index: 0;
  padding-block: clamp(2.75rem, 6vw, 5.25rem) clamp(3rem, 7vw, 5.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2rem;
  right: 0;
  width: min(34rem, 70%);
  height: 24rem;
  background: radial-gradient(ellipse at center, var(--glow), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 1.35rem;
  align-items: start;
}

.portrait {
  margin: 0;
  max-width: 15.75rem;
}

.portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.hero-follow .roster-index {
  margin-top: 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero h1 {
  margin: 0.7rem 0 0;
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(3.6rem, 12vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 480;
}

.rule {
  width: 3.25rem;
  height: 2px;
  margin: 1.35rem 0 0;
  background: var(--accent);
}

.lede {
  max-width: 38rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.55;
}

.tools-label {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0;
  max-width: 40rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.tools li {
  font-size: 0.98rem;
  font-weight: 500;
}

.tools li:not(:last-child)::after {
  content: "·";
  margin: 0 0.55rem;
  color: var(--accent);
}

.roster-index {
  margin: 0;
}

.roster-index ol {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.roster-index a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
}

.roster-index li:last-child a {
  border-bottom: 1px solid var(--line);
}

.roster-index a span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 520;
  color: var(--accent);
}

.roster-index a:hover {
  color: var(--accent);
}

.team {
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
  scroll-margin-top: var(--header-offset);
}

.section-intro {
  max-width: 40rem;
}

.section-intro h2,
.how h2,
.contact h2 {
  margin: 0.75rem 0 0.85rem;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-intro p,
.how .intro,
.contact .intro {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.supervisor {
  display: grid;
  gap: 0.85rem;
  margin-top: 2.25rem;
  padding: 1.35rem 1.25rem 1.45rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--bg-elev)), var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 18px;
  scroll-margin-top: calc(var(--header-offset) + 0.75rem);
}

.supervisor h3 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.supervisor .duty {
  margin: 0;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.5;
}

.group {
  display: grid;
  gap: 1.15rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-offset) + 0.75rem);
}

.group-num {
  display: block;
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 520;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
}

.group-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.65rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.group-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  max-width: 24rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.bot {
  margin: 0;
  padding: 1.15rem 1.15rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.bot h4 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-weight: 540;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.bot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.bot:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.how {
  background: var(--bg-elev);
  border-block: 1px solid var(--line);
  padding-block: clamp(3.25rem, 7vw, 5.75rem);
  scroll-margin-top: var(--header-offset);
}

.how h2 {
  max-width: 14em;
}

.steps {
  display: grid;
  gap: 1.75rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.steps h3 {
  margin: 0.35rem 0 0.45rem;
  font-family: var(--serif);
  font-weight: 540;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.step-num {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 520;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--accent);
}

.built {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  scroll-margin-top: var(--header-offset);
}

.work-grid {
  display: grid;
  gap: 0.8rem;
  margin-top: 2.25rem;
}

.work {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 1.25rem 1.2rem 1.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}

.work h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 540;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.work p {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.5;
}

.work ul {
  margin: 0;
  padding: 0 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.work li + li {
  margin-top: 0.35rem;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--ink);
  font-weight: 560;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.work-link svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
}

.work-link:hover {
  color: var(--accent);
}

.contact {
  padding-block: clamp(3.25rem, 8vw, 6rem);
  scroll-margin-top: var(--header-offset);
}

.contact h2 {
  max-width: 12em;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.9rem 1.15rem;
  min-height: 2.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 580;
  letter-spacing: -0.011em;
  border-radius: 4px;
}

.link-button svg {
  width: 1rem;
  height: 1rem;
}

.link-button:hover {
  filter: brightness(1.08);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.35rem 1.7rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 800px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 760px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav toggle";
    gap: 1rem;
    padding-block: 0;
  }

  .nav {
    justify-content: flex-end;
    margin-right: 0.35rem;
  }
}

@media (min-width: 900px) {
  .group {
    grid-template-columns: 18.75rem minmax(0, 1fr);
    gap: 2.25rem 2.75rem;
    align-items: start;
  }

  .group-head {
    position: sticky;
    top: calc(var(--header-offset) + 0.85rem);
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 17.25rem;
    column-gap: 3.25rem;
    row-gap: 1.15rem;
    align-items: start;
  }

  .portrait {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: none;
    width: 100%;
    align-self: start;
    margin-top: 0.35rem;
  }

  .hero-heading,
  .hero-follow {
    grid-column: 1;
  }

  .supervisor {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem);
    align-items: end;
    gap: 1.5rem 2rem;
    padding: 1.85rem 2rem 2rem;
  }

  .supervisor .duty {
    justify-self: end;
    padding-bottom: 0.35rem;
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .contact-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: end;
  }

  .link-button {
    margin-top: 0;
    margin-bottom: 0.2rem;
  }
}

@media (max-width: 639px) {
  .link-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
