:root {
  --bg: #111210;
  --fg: #f1efe8;
  --muted: #86897f;
  --line: #31342f;
  --accent: #cdd5c2;
  --ease: cubic-bezier(.22, .7, .16, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { color: var(--fg); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }

.page {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: auto;
  padding: 32px clamp(26px, 6vw, 92px) 28px;
  background: var(--bg);
  color: var(--fg);
  isolation: isolate;
}

.page.paper {
  --muted: #676a63;
  --line: #d8d5cc;
  --accent: #4f584b;
  background: #efece4;
  color: #1a1b19;
}

.mast {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.mast a { font-weight: 600; }
.mast a:focus-visible, .back:focus-visible, .project-link:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.home {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, .95fr);
  align-items: center;
  gap: 34px;
  min-height: calc(100dvh - 58px);
}
.left { position: relative; z-index: 3; padding-left: clamp(0px, 4vw, 48px); }
.name { margin: 0 0 42px; font: 400 clamp(56px, 9vw, 132px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.078em; }
.nav { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font: 400 clamp(26px, 2.55vw, 37px)/1.56 Georgia, "Times New Roman", serif;
  letter-spacing: -.04em;
  transition: transform .22s var(--ease), opacity .18s ease, color .18s ease;
}
.nav a .n { min-width: 18px; color: #8d9088; font: 400 10px/1 Arial, Helvetica, sans-serif; letter-spacing: .04em; }
.nav:hover a { opacity: .52; }
.nav a:hover, .nav a:focus-visible { opacity: 1; transform: translateX(4px); }
.nav a[data-state="projects"]:hover, .nav a[data-state="projects"]:focus-visible { color: #caa184; }
.nav a[data-state="thoughts"]:hover, .nav a[data-state="thoughts"]:focus-visible { color: #b6c6d8; }
.nav a[data-state="about"]:hover, .nav a[data-state="about"]:focus-visible { color: #bfd0b7; }

.right { position: relative; display: flex; align-items: center; justify-content: center; min-height: 68vh; }
.right::before {
  position: absolute;
  width: min(35vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156,174,194,.045), rgba(202,161,132,.025) 42%, transparent 73%);
  content: "";
  pointer-events: none;
}
.diagram-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(36vw, 500px);
  min-width: 300px;
  aspect-ratio: 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.22));
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform .9s var(--ease), filter .35s ease;
  will-change: transform;
}
.diagram-wrap::before {
  position: absolute;
  inset: -7%;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 50%;
  content: "";
  opacity: .55;
  transform: scale(.97);
  transition: transform .55s var(--ease), opacity .25s ease;
}
.page.paper .diagram-wrap::before { border-color: rgba(0,0,0,.06); }
.diagram { width: 100%; height: 100%; overflow: visible; }
.ring { fill: none; stroke: rgba(241,239,232,.31); stroke-width: 1.2; transition: stroke .25s ease, opacity .25s ease; }
.ring.mid { stroke: rgba(241,239,232,.22); }
.ring.inner { stroke: rgba(241,239,232,.12); }
.page.paper .ring { stroke: rgba(26,27,25,.34); }
.page.paper .ring.mid { stroke: rgba(26,27,25,.20); }
.page.paper .ring.inner { stroke: rgba(26,27,25,.10); }
.guide { fill: none; stroke: rgba(241,239,232,.10); stroke-width: .85; opacity: .48; transition: opacity .25s ease; }
.page.paper .guide { stroke: rgba(26,27,25,.08); }
.chord { fill: none; stroke: var(--color, rgba(241,239,232,.48)); stroke-width: 1.7; stroke-linecap: round; opacity: .68; transition: stroke .22s ease, stroke-width .22s ease, opacity .22s ease; }
.node { fill: var(--color, rgba(241,239,232,.30)); opacity: .56; transition: fill .22s ease, opacity .22s ease; }
.chord.projects, .node.projects { --color: #caa184; }
.chord.thoughts, .node.thoughts { --color: #9caec2; }
.chord.about, .node.about { --color: #a8bba0; }
.page.paper .chord.projects, .page.paper .node.projects { --color: #9c6d54; }
.page.paper .chord.thoughts, .page.paper .node.thoughts { --color: #5c7795; }
.page.paper .chord.about, .page.paper .node.about { --color: #667e5f; }

.home[data-state="projects"] .projects,
.home[data-state="thoughts"] .thoughts,
.home[data-state="about"] .about { stroke: var(--color, var(--fg)); stroke-width: 3; opacity: 1; }
.home[data-state="projects"] .projects.node,
.home[data-state="thoughts"] .thoughts.node,
.home[data-state="about"] .about.node { fill: var(--color, var(--fg)); opacity: 1; }
.home[data-state]:not([data-state="idle"]) .diagram-wrap { filter: drop-shadow(0 24px 48px rgba(0,0,0,.28)); }
.home[data-state]:not([data-state="idle"]) .diagram-wrap::before { opacity: .78; transform: scale(1); }
.home[data-state]:not([data-state="idle"]) .guide { opacity: .45; }
.home[data-state="projects"] .chord:not(.projects), .home[data-state="thoughts"] .chord:not(.thoughts), .home[data-state="about"] .chord:not(.about) { opacity: .24; }
.home[data-state="projects"] .node:not(.projects), .home[data-state="thoughts"] .node:not(.thoughts), .home[data-state="about"] .node:not(.about) { opacity: .20; }

.sub { position: relative; z-index: 3; max-width: 820px; margin: auto; padding: clamp(72px, 12vh, 140px) 0 58px; }
.back { display: inline-block; margin-bottom: 56px; color: var(--muted); font-size: 12px; }
.headline { margin: 0 0 34px; font: 400 clamp(68px, 11vw, 132px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.072em; }
.items { border-top: 1px solid var(--line); }
.item { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.project-link { display: inline-flex; align-items: center; gap: 14px; }
.project-link:hover .project-name, .project-link:focus-visible .project-name { color: #9c6d54; }
.project-icon { width: 35px; height: 35px; object-fit: contain; flex-shrink: 0; }
.item strong { font: 400 clamp(22px, 2.8vw, 30px)/1.2 Georgia, serif; letter-spacing: -.03em; }
.item small { color: var(--muted); font-size: 12px; }
.bodycopy { max-width: 660px; font: 400 clamp(21px, 2.5vw, 29px)/1.62 Georgia, serif; letter-spacing: -.015em; }
.bodycopy p { margin: 0 0 28px; }
.inline-link { text-decoration: underline; text-decoration-color: rgba(126,143,120,.65); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color .2s ease; }
.inline-link:hover, .inline-link:focus-visible { color: #627d61; }
.coming-soon { margin: 12px 0; color: var(--muted); font: 400 clamp(22px, 2.5vw, 28px)/1.6 Georgia, serif; }
.mini { position: absolute; right: clamp(24px, 6vw, 92px); bottom: 26px; width: min(15vw, 160px); opacity: .13; pointer-events: none; }
.wipe { z-index: 20; pointer-events: none; will-change: clip-path; }
.no-script { padding: 12vh 8vw; font-family: Georgia, serif; }
.no-script h1 { font-size: clamp(48px, 10vw, 120px); font-weight: 400; letter-spacing: -.06em; }

@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; align-items: start; padding-top: 5vh; }
  .left { padding-left: 0; }
  .right { order: -1; justify-content: flex-end; min-height: 32vh; }
  .right::before { width: min(52vw, 390px); }
  .diagram-wrap { width: min(52vw, 400px); min-width: 230px; }
}

@media (max-width: 600px) {
  .page { padding: 24px 22px 22px; }
  .mast { font-size: 10px; }
  .name { margin-bottom: 34px; font-size: clamp(54px, 14vw, 86px); }
  .nav a { font-size: 31px; }
  .sub { padding: 54px 0 48px; }
  .back { margin-bottom: 44px; }
  .item { flex-direction: column; gap: 8px; }
  .diagram-wrap { width: min(62vw, 320px); min-width: 190px; }
  .mini { right: 20px; bottom: 18px; width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
