:root {
  --paper: #ECEFEB;
  --sheet: #F7F9F6;
  --ink: #1D2225;
  --muted: #58646A;
  --rule: #B4BCBE;
  --blue: #2250C8;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --max: 1280px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  z-index: 10;
}
.skip:focus { top: .75rem; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.mark {
  font-weight: 700;
  font-stretch: 112%;
  font-size: 1.125rem;
  letter-spacing: -.01em;
  text-decoration: none;
}
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .3em;
}

/* Hero: structural grid axes with bubbles, like a drawing sheet */
.hero-inner {
  position: relative;
  padding-top: 4.5rem;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
.axes {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr) 0;
  pointer-events: none;
}
.axes span {
  position: relative;
  font-size: .8125rem;
  font-weight: 500;
}
.axes span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--rule) 0 14px,
    transparent 14px 20px,
    var(--rule) 20px 23px,
    transparent 23px 29px
  );
  transform-origin: top;
  animation: draw 1.4s cubic-bezier(.2, .7, .2, 1) both;
}
.axes span:nth-child(2)::before { animation-delay: .12s; }
.axes span:nth-child(3)::before { animation-delay: .24s; }
.axes span:nth-child(4)::before { animation-delay: .36s; }
.axes span:nth-child(5)::before { animation-delay: .48s; }
.axes b {
  position: absolute;
  top: 1rem;
  left: 0;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 500;
}
@keyframes draw {
  from { transform: scaleY(0); }
}

.hero-name {
  position: relative;
  margin: 3rem 0 0;
  font-size: clamp(4.5rem, 19vw, 17rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: .85;
  letter-spacing: -.04em;
}
.hero-lede {
  position: relative;
  max-width: 34rem;
  margin: 2.5rem 0 0 25%;
  padding-left: 1.25rem;
  background: var(--paper);
  font-size: 1.25rem;
  line-height: 1.5;
}

/* Sections */
.block {
  border-top: 1px solid var(--rule);
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
.block h2 {
  margin: 0 0 2rem;
  font-size: 1.75rem;
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.2;
  letter-spacing: -.01em;
}

/* Project card shaped like a drawing sheet */
.sheet {
  --edge: var(--ink);
  display: block;
  background: var(--sheet);
  border: 1px solid var(--edge);
  text-decoration: none;
  transition: border-color .2s;
}
.sheet:hover { --edge: var(--blue); }
.sheet-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--edge);
}
.sheet-foot {
  display: grid;
  grid-template-columns: 1fr auto auto;
}
.sheet-foot > * {
  margin: 0;
  padding: .9rem 1.1rem;
  border-left: 1px solid var(--edge);
}
.sheet-foot > :first-child { border-left: 0; }
.sheet-title { font-size: 1.25rem; font-weight: 600; font-stretch: 106%; }
.sheet-meta { color: var(--muted); }

/* About and contact */
.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem 2rem;
}
.about h2 { margin: 0; }
.about p { max-width: 38rem; margin: 0; }

.mail {
  display: inline-block;
  font-size: clamp(1.5rem, 5vw, 3.25rem);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -.02em;
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.mail:hover { color: var(--blue); }

.site-foot {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: .9375rem;
}

/* Project page */
.back {
  display: inline-block;
  margin-top: .5rem;
  color: var(--muted);
  text-underline-offset: .3em;
}
.back:hover { color: var(--ink); }

.project-title {
  margin: 1.5rem 0 2rem;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: .95;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}

.figure {
  margin: 0;
  background: var(--sheet);
  border: 1px solid var(--ink);
}
.figure img { width: 100%; }

.detail {
  display: grid;
  grid-template-columns: 1fr minmax(16rem, 22rem);
  gap: 2rem 3rem;
  align-items: start;
  padding-top: 2.5rem;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.detail-text { max-width: 38rem; }
.detail-text p { margin: 0 0 1.1rem; }

.tblock {
  margin: 0;
  background: var(--sheet);
  border: 1px solid var(--ink);
}
.tblock div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  border-top: 1px solid var(--ink);
}
.tblock div:first-child { border-top: 0; }
.tblock dt,
.tblock dd { margin: 0; padding: .6rem .9rem; }
.tblock dt {
  color: var(--muted);
  font-size: .9375rem;
  border-right: 1px solid var(--ink);
}

.file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--sheet);
  border: 1px solid var(--ink);
}
.file p { margin: 0; }
.file-name { font-size: 1.25rem; font-weight: 600; font-stretch: 106%; }
.file-note { color: var(--muted); }

.btn {
  display: inline-block;
  padding: .8rem 1.25rem;
  background: var(--blue);
  border: 1px solid var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); }

@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .sheet-foot { grid-template-columns: 1fr auto; }
  .sheet-foot > :nth-child(2) { display: none; }
  .hero-lede { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .axes span::before { animation: none; }
  .sheet, .btn { transition: none; }
}
