@font-face {
  font-family: Sora;
  src: url("../fonts/sora.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #edf2f7;
  --paper-2: #f8fafc;
  --ink: #0b1220;
  --ink-soft: #26364b;
  --muted: #5e7088;
  --line: rgba(11, 18, 32, 0.14);
  --line-strong: rgba(11, 18, 32, 0.34);
  --copper: #2f6fed;
  --copper-deep: #1d4ed8;
  --night: #07111f;
  --paper-on-night: #f1f6ff;
  --copper-light: #b9d1ff;
  --danger: #b42318;
  --serif: Sora, "Avenir Next", "Segoe UI", sans-serif;
  --sans: Sora, "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --header: 76px;
  --max: 1120px;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(47, 111, 237, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 237, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  background: #cbd5e1;
}

a {
  color: inherit;
}

a:visited {
  color: inherit;
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper-2);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.brand-en {
  display: block;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-fa {
  display: block;
  margin-top: 3px;
  font-family: var(--fa);
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 0 8px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.nav-toggle-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-toggle-lines {
  position: relative;
  width: 18px;
  height: 12px;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.18s ease, top 0.18s ease, bottom 0.18s ease;
}

.nav-toggle-lines::before {
  top: 1px;
}

.nav-toggle-lines::after {
  bottom: 1px;
}

body.nav-open .nav-toggle-lines::before {
  top: 5px;
  transform: rotate(40deg);
}

body.nav-open .nav-toggle-lines::after {
  bottom: 5px;
  transform: rotate(-40deg);
}

#site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

#site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
}

#site-nav a:hover {
  color: var(--copper);
}

#site-nav a[aria-current="page"] {
  color: var(--copper-deep);
}

.nav-contact {
  margin-left: 6px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper-2);
}

a.nav-contact:visited,
#site-nav a.nav-contact {
  color: var(--paper-2);
}

#site-nav a.nav-contact:hover,
a.nav-contact[aria-current="page"] {
  background: var(--copper-deep);
  color: var(--paper-2);
}

.index {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
}

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

h1, h2 {
  text-wrap: balance;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 32px 48px;
  align-items: center;
  padding: 48px 0 20px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(2.75rem, 4.8vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: -0.038em;
}

.hero-copy h1 em {
  font-style: normal;
  font-weight: 650;
  color: var(--copper);
}

.lede {
  margin: 0;
  max-width: 40ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.22rem;
  line-height: 1.42;
  letter-spacing: -0.014em;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper-2);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.94rem;
  border: 0;
  cursor: pointer;
}

a.btn:visited {
  color: var(--paper-2);
}

.btn:hover {
  background: var(--copper-deep);
  color: var(--paper-2);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

a.btn.ghost:visited {
  color: var(--ink);
}

.btn.ghost:hover {
  background: var(--ink);
  color: var(--paper-2);
}

.btn.light {
  background: var(--paper-2);
  color: var(--ink);
}

a.btn.light:visited {
  color: var(--ink);
}

.btn.light:hover {
  background: var(--copper-light);
  color: var(--ink);
}

.hero-figure {
  position: relative;
  margin: 0;
  height: min(68vh, 640px);
  min-height: 420px;
}

.hero-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(11, 18, 32, 0.28);
}

.hero-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(7, 17, 31, 0.8);
  color: var(--paper-on-night);
}

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts li {
  padding: 18px 18px 20px 0;
}

.facts li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.facts strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.facts span {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  padding: 84px 0;
}

.section.flush {
  padding-top: 0;
}

.section.tight {
  padding-top: 28px;
}

.pad-bottom {
  padding-bottom: 72px;
}

.section-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  margin-bottom: 10px;
}

.section-head h2,
.page-hero h1,
.chapter h2,
.night-band h2,
.project h3,
.split h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.034em;
}

.section-head h2 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.02;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 28px 48px;
  align-items: end;
  padding: 42px 0 12px;
}

.project.is-flip {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
}

.project.is-flip .project-copy {
  order: 2;
}

.project h3 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.02;
}

.project p {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

figure {
  margin: 0;
}

figcaption,
.hero-figure figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  color: var(--muted);
}

.frame {
  display: block;
  width: 100%;
  box-shadow: 0 0 0 1px rgba(11, 18, 32, 0.28);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 18px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  color: var(--copper-deep);
  font-size: 0.95rem;
  text-decoration: none;
}

.text-link:hover {
  color: var(--ink);
}

.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.practice-grid article {
  padding: 26px 32px 30px 0;
  border-bottom: 1px solid var(--line);
}

.practice-grid article:nth-child(odd) {
  padding-right: 32px;
  border-right: 1px solid var(--line);
}

.practice-grid article:nth-child(even) {
  padding-left: 32px;
}

.practice-grid h3 {
  margin: 8px 0 8px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.practice-grid h3 a {
  text-decoration: none;
}

.practice-grid h3 a:hover {
  color: var(--copper);
}

.practice-grid p {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 36px 56px;
  align-items: start;
}

.split h2 {
  margin: 12px 0 16px;
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  line-height: 1.02;
  max-width: 14ch;
}

.portrait img {
  width: 100%;
  max-height: 760px;
  object-fit: cover;
}

.prose {
  max-width: 64ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.48;
  letter-spacing: -0.012em;
  color: var(--ink-soft);
}

.prose p {
  margin: 0;
}

.prose p + p {
  margin-top: 1em;
}

.prose a {
  color: var(--copper-deep);
}

.night-band {
  background: var(--night);
  color: var(--paper-on-night);
  padding: 84px 0;
}

.night-band .index {
  color: var(--copper-light);
}

.night-band h2 {
  margin: 14px 0 0;
  max-width: 18ch;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1.02;
}

.night-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 28px;
}

.night-band .mail {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--copper-light);
}

.night-band :focus-visible {
  outline-color: var(--copper-light);
}

.page-hero {
  padding: 42px 0 12px;
}

.page-hero h1 {
  margin: 12px 0 18px;
  max-width: 14ch;
  font-size: clamp(2.8rem, 6vw, 5.15rem);
  line-height: 0.94;
}

.page-hero .lede {
  max-width: 46ch;
  font-size: 1.28rem;
}

.page-hero .actions {
  margin-top: 22px;
}

.wide {
  margin: 28px 0 8px;
}

.stack {
  display: grid;
  gap: 56px;
  padding: 28px 0 72px;
}

.block h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 540;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.with-figure {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 28px 48px;
  align-items: start;
}

.spec {
  margin: 8px 0 0;
  border-top: 1px solid var(--line);
}

.spec div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  margin: 0;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.next-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 26px 0 72px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.next-link span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.next-link strong {
  font-family: var(--serif);
  font-weight: 540;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.next-link:hover strong {
  color: var(--copper);
}

.chapter {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px 24px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.chapter h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 1.02;
}

.chapter .inset {
  max-width: 680px;
  margin-top: 26px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px 64px;
  padding-bottom: 80px;
}

.contact-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.contact-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.contact-list span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  color: var(--copper);
}

form {
  display: grid;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
}

.field {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.field label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.45;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 55%,
    calc(100% - 7px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--copper);
}

.field .error {
  min-height: 1.1em;
  margin: 0;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea,
.field[data-invalid="true"] select {
  border-bottom-color: var(--danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 10px;
}

#form-status {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  background: #ddd6c6;
  border-top: 1px solid var(--line);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.footer-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 540;
  letter-spacing: -0.03em;
}

.footer-fa {
  margin: 6px 0 0;
  font-family: var(--fa);
  color: var(--muted);
}

.footer-meta {
  margin: 16px 0 0;
  color: var(--ink-soft);
}

.footer-label {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-grid a {
  display: block;
  width: fit-content;
  margin: 6px 0;
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--copper);
}

.footer-mail {
  font-family: var(--serif);
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.footer-base p {
  margin: 0;
}

@media (max-width: 980px) {
  .section-head,
  .chapter,
  .with-figure,
  .contact-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .chapter .index {
    margin-bottom: -8px;
  }

  .footer-grid {
    gap: 32px;
  }
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-flex;
  }

  #site-nav {
    position: fixed;
    z-index: 30;
    inset: var(--header) 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 28px 24px 48px;
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.nav-open #site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  #site-nav a,
  #site-nav a.nav-contact,
  a.nav-contact:visited {
    padding: 6px 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(2.1rem, 8vw, 3.1rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
  }

  #site-nav a.nav-contact {
    margin: 10px 0 0;
  }

  .hero-grid {
    display: block;
    padding-top: 28px;
  }

  .hero-copy {
    display: block;
  }

  .hero-figure {
    height: auto;
    min-height: 0;
    margin-top: 28px;
  }

  .hero-figure img {
    position: static;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .project,
  .project.is-flip {
    grid-template-columns: 1fr;
  }

  .project.is-flip .project-copy {
    order: -1;
  }
}

@media (max-width: 700px) {
  .wrap {
    width: min(var(--max), calc(100% - 32px));
  }

  .header-inner {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-en {
    font-size: 1.08rem;
  }

  .facts,
  .practice-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .facts li + li,
  .practice-grid article:nth-child(odd),
  .practice-grid article:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
    border-right: 0;
  }

  .facts li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }

  .facts {
    border-bottom: 0;
  }

  .section {
    padding: 60px 0;
  }

  .spec div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-base,
  .next-link,
  .hero-figure figcaption {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-hero h1 {
    max-width: none;
  }
}

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

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

@media print {
  .site-header,
  .nav-toggle,
  .night-band .btn,
  .skip {
    display: none;
  }

  body,
  .site-footer,
  .night-band {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}
