/* juliusritter.com
   After thinkingmachines.ai: white page, one centered reading column, a wide letterspaced
   wordmark in a metallic gradient, serif prose, plain sans headings, a small "new" pill.
   Project rows carry a plain logo that blooms into a watercolor version on hover. */

:root {
  --paper: #ffffff;
  --ink: #1f1f1f;
  --ink-soft: #4a4a4a;
  --ink-faint: #8a8a8a;
  --rule: #ebebeb;
  --pill: #f1f1f1;
  --accent: #e8590c;

  --serif: "Libre Baskerville", Baskerville, "Iowan Old Style", Georgia, serif;
  --sans: "Libre Baskerville", Baskerville, Georgia, serif;
  --wide: "Baskervville SC", "Libre Baskerville", Baskerville, serif;
  --gold-1: #8a6a14;
  --gold-2: #e2c25c;
  --gold-3: #b08a24;
  --gold-4: #f0dc8a;

  --col: 42rem;
  --gutter: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

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

/* ---- top nav ---- */

.top {
  display: flex;
  justify-content: flex-end;
  padding: 28px var(--gutter) 0;
}

.top nav {
  display: flex;
  gap: 26px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
}

.top nav a:hover {
  color: var(--ink-faint);
}

/* ---- column ---- */

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 96px var(--gutter) 96px;
}

/* ---- wordmark ---- */

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18em;
  margin: 24px 0 56px;
  font-family: var(--wide);
  font-weight: 400;
  font-size: clamp(38px, 8.6vw, 96px);
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-indent: 0.2em; /* balances the trailing letter-spacing */
}

.wordmark span {
  /* the Thinking Machines metallic sweep, in the Peptide Club gold */
  background: linear-gradient(100deg, var(--gold-1) 0%, var(--gold-2) 38%, var(--gold-3) 62%, var(--gold-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- pill line ---- */

.pill-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 72px;
  font-family: var(--sans);
  font-size: 17px;
}

.pill {
  display: inline-block;
  font-family: var(--wide);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pill-line a:hover {
  color: var(--ink-faint);
}

/* ---- prose ---- */

.prose p {
  font-size: 20px;
  line-height: 1.7;
}

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

/* ---- sections ---- */

h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 72px 0 22px;
}

/* ---- project rows ---- */

.list {
  list-style: none;
}

.row {
  border-top: 1px solid var(--rule);
}

.row:last-child {
  border-bottom: 1px solid var(--rule);
}

.row-link {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 26px;
  align-items: center;
  padding: 22px 0;
}

a.row-link:hover .name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--ink-faint);
}

.mark {
  position: relative;
  width: 128px;
  aspect-ratio: 4 / 3;
  overflow: visible;
}

/* Both layers are 880x660 renders of the same canvas, so the same box puts the
   plain letterforms exactly on top of the painted ones. */
.mark img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mark .plain {
  filter: grayscale(1) contrast(1.05);
  opacity: 0.82;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.mark-cpc .plain {
  opacity: 0.9;
}

/* Watercolor version sits on top, hidden until hover. It blooms out from the centre
   like a wet wash spreading on paper: a soft-edged circle that grows while the plain
   logo fades underneath. */
.mark .wash {
  mix-blend-mode: multiply;
  opacity: 0;
  clip-path: circle(0% at 50% 50%);
  transform: scale(0.96);
  filter: blur(2px);
  transition: clip-path 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.35s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s ease;
  pointer-events: none;
}

.row-link:hover .wash,
.row-link:focus-visible .wash {
  opacity: 1;
  clip-path: circle(75% at 50% 50%);
  transform: scale(1);
  filter: blur(0);
}

.row-link:hover .plain,
.row-link:focus-visible .plain {
  opacity: 0;
}

.mark-empty {
  height: 44px;
}

.text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.name {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.desc {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .row-link {
    grid-template-columns: 96px 1fr;
    gap: 18px;
    padding: 18px 0;
  }
  .mark {
    width: 96px;
  }
}

/* On touch there is no hover: show the watercolor straight away, quietly. */
@media (hover: none) {
  .mark .wash {
    opacity: 1;
    clip-path: none;
    transform: none;
    filter: none;
  }
  .mark .plain {
    opacity: 0;
  }
}

/* ---- contact ---- */

.contact form {
  display: grid;
  gap: 22px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 560px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 4px;
}

.field label {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
}

.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #d6d6d6;
  border-radius: 0;
  padding: 6px 0 9px;
  transition: border-color 0.2s;
}

.field textarea {
  resize: none;
  line-height: 1.5;
}

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

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

.actions {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.cta {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.cta:hover {
  background: #000;
}

.cta[disabled] {
  opacity: 0.5;
  cursor: progress;
}

.status {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-faint);
  min-height: 1.4em;
}

.status.ok {
  color: var(--ink);
}

.status.err {
  color: var(--accent);
}

/* ---- footer ---- */

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px var(--gutter) 24px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
}

.legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.legal a:hover {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .mark .wash,
  .mark .plain {
    transition: none;
  }
}
