:root {
  --font-sans: "Archivo", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "Fira Code", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --brand-font: "Instrument Serif", serif;

  --paper: oklch(0 0 0);
  --paper-2: oklch(0.16 0 0);
  --ink: oklch(0.98 0 0);
  --muted: oklch(0.70 0 0);
  --faint: oklch(0.48 0 0);
  --line: oklch(0.30 0 0);
  --line-soft: oklch(0.20 0 0);
  --accent: oklch(0.87 0.19 99);

  --site-width: 61.8vw;
  --nav-w: 12rem;
  --site-column-gap: 4rem;
  --site-pad-top: 2.8rem;
  --site-pad-bottom: 5rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 39rem;

  --brand-size: 3.1rem;
  --brand-line-gap: 0.52rem;
  --brand-to-nav: 1.3rem;
  --mark-gap: 0.103em;
  --mark-kern: 0em;

  --nav-size: 1.84rem;
  --nav-row-gap: 0.48rem;
  --contact-offset: var(--brand-to-nav);
  --contact-row-gap: 0.03rem;

  --mobile-brand-size: 2.1rem;
  --mobile-nav-size: 1.85rem;
  --mobile-nav-row-gap: 0.4rem;
  --mobile-contact-offset: var(--brand-to-nav);
  --mobile-contact-row-gap: var(--contact-row-gap);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.012em;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
main,
figure {
  margin: 0;
}

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

.site {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  column-gap: var(--site-column-gap);
  width: var(--site-width);
  max-width: none;
  margin: 0 auto;
  padding: var(--site-pad-top) 0 var(--site-pad-bottom);
}

.sidebar {
  position: sticky;
  top: var(--site-pad-top);
  z-index: 10;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: var(--nav-w);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--brand-line-gap);
  margin: 0 0 var(--brand-to-nav);
  color: var(--ink);
  font-family: var(--brand-font);
  font-size: var(--brand-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
}

.brand[data-kern="overhang"],
.brand-kern-overhang {
  --mark-kern: -0.045em;
}

.brand-row {
  display: inline-flex;
  align-items: baseline;
}

.brand-line,
.nav-item {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.brand-mark {
  display: block;
  flex: none;
  width: 0.206em;
  height: 0.297em;
  margin-left: calc(var(--mark-gap) + var(--mark-kern));
  background: var(--accent);
  transform: translateY(0.022em) skewX(-16deg);
  transform-origin: bottom left;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: var(--nav-row-gap);
  align-items: flex-start;
}

.nav-item {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--nav-size);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  text-decoration-thickness: 3px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.nav-item:hover {
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active:hover {
  text-decoration: none;
}

.side-contact {
  display: flex;
  flex-direction: column;
  gap: var(--contact-row-gap);
  align-items: flex-start;
  margin-top: var(--contact-offset);
}

.side-contact a {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: lowercase;
  transition: color 0.18s ease;
}

.side-contact a:hover {
  color: var(--accent);
}

.wrap,
.page {
  min-width: 0;
  width: 100%;
}

.section-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-desc {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 48rem;
  text-wrap: pretty;
}

@media (max-width: 860px) {
  .site {
    grid-template-columns: 1fr;
    column-gap: 0;
    width: auto;
    max-width: none;
    padding-top: 1.6rem;
    padding-inline: var(--gutter);
  }

  .sidebar {
    position: static;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 2.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .sidebar .brand {
    margin-bottom: var(--brand-to-nav);
    font-size: var(--mobile-brand-size);
  }

  .nav {
    flex-direction: column;
    gap: var(--mobile-nav-row-gap);
    align-items: flex-start;
  }

  .nav-item {
    font-size: var(--mobile-nav-size);
  }

  .side-contact {
    margin-top: var(--mobile-contact-offset);
    gap: var(--mobile-contact-row-gap);
  }
}
