/* Mark Crumpacker — markc.co
   Palette (monochrome by design):
   char      #131311  dark field (hero, footer)
   porcelain #FBFBF9  page
   ink       #1D1C18  text
   graphite  #6E6C64  secondary text
   hairline  #E5E3DC  rules
   bone      #F2F1EC  soft panels on dark
*/

:root {
  --char: #131311;
  --porcelain: #fbfbf9;
  --ink: #1d1c18;
  --graphite: #6e6c64;
  --hairline: #e5e3dc;
  --bone: #f1efe9;
  --dark-text: #f1efe9;
  --dark-muted: #a5a29a;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --measure: 42rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-optical-sizing: auto;
  background: var(--porcelain);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* ---------- utility label ---------- */

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--char);
  color: var(--dark-text);
  overflow: hidden;
}

.hero::after {
  /* faint vignette so the portrait's field reads as one surface */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 78% 30%, rgba(255, 255, 255, 0.045), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 88vh;
}

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2.1rem;
}

.wordmark {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.9rem;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dark-muted);
  transition: color 0.25s ease;
}

.site-nav a:hover { color: var(--dark-text); }

.hero-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 5rem 0 6rem;
}

.hero-copy {
  max-width: 36rem;
  animation: rise 1.1s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 275;
  line-height: 1.08;
  letter-spacing: -0.012em;
}

.hero-copy h1 em {
  font-style: italic;
  font-weight: 300;
}

.hero-copy .lede {
  margin-top: 2rem;
  max-width: 30rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--dark-muted);
}

.hero-portrait {
  position: absolute;
  right: clamp(-4rem, 2vw, 4rem);
  bottom: 0;
  width: min(32rem, 44vw);
  z-index: 0;
  -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 8%, #000 62%, transparent 98%);
  mask-image: linear-gradient(to left, transparent 0%, #000 8%, #000 62%, transparent 98%);
  animation: fade 1.6s ease both;
}

.hero-portrait img {
  width: 100%;
  -webkit-mask-image: linear-gradient(to top, #000 68%, transparent 96%);
  mask-image: linear-gradient(to top, #000 68%, transparent 96%);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

main .section:nth-of-type(even) { background: var(--bone); }

.section-grid {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 2rem 4rem;
}

.section-grid > .label { padding-top: 0.55rem; }

.prose { max-width: var(--measure); }

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

.prose .kicker {
  font-size: 1.3125rem;
  line-height: 1.6;
}

/* ---------- beliefs ---------- */

.beliefs { max-width: 46rem; }

.belief { padding: 2.6rem 0; }

.belief:first-child { padding-top: 0; }

.belief:last-child { padding-bottom: 0; }

.belief + .belief { border-top: 1px solid var(--hairline); }

.belief h3 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 330;
  line-height: 1.25;
  letter-spacing: -0.008em;
}

.belief p {
  margin-top: 0.9rem;
  max-width: 36rem;
  color: var(--graphite);
  line-height: 1.65;
}

.belief p + p { margin-top: 0.6rem; }

/* ---------- original art ---------- */

.art-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.8rem;
}

.art-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  gap: 2rem 3.5rem;
  align-items: start;
}

.art-gallery {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.art-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.art-figure img,
.art-figure video {
  width: 100%;
  display: block;
}

.art-figure figcaption {
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* ---------- stories ---------- */

.stories { max-width: 46rem; }

.story {
  display: block;
  text-decoration: none;
  padding: 2.6rem 0;
}

.story:first-child { padding-top: 0; }

.story:last-child { padding-bottom: 0; }

.story + .story { border-top: 1px solid var(--hairline); }

.story h3 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 330;
  line-height: 1.25;
  letter-spacing: -0.008em;
  transition: opacity 0.25s ease;
}

.story:hover h3 { opacity: 0.55; }

.story .sub {
  margin-top: 0.35rem;
  font-style: italic;
  color: var(--graphite);
}

.story .dek {
  margin-top: 0.8rem;
  max-width: 36rem;
  color: var(--graphite);
  line-height: 1.65;
}

.story .cue {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

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

.site-foot {
  background: var(--char);
  color: var(--dark-text);
}

.foot-inner {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.foot-inner .label { color: var(--dark-muted); }

.foot-inner h2 {
  margin-top: 1.4rem;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 285;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 32rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  margin-top: 2rem;
}

.foot-inner .email {
  display: inline-block;
  font-size: 1.25rem;
  font-style: italic;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

.foot-inner .email:hover { opacity: 0.6; }

.foot-meta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem 0 2rem;
  border-top: 1px solid rgba(241, 239, 233, 0.14);
}

.foot-meta span,
.foot-meta a {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-muted);
  text-decoration: none;
}

.foot-meta a:hover { color: var(--dark-text); }

/* ---------- essay pages ---------- */

.essay-head {
  border-bottom: 1px solid var(--hairline);
}

.essay-head .site-head {
  padding: 1.6rem 0;
}

.essay-head .wordmark { color: var(--ink); }

.essay-head .site-nav a { color: var(--graphite); }

.essay-head .site-nav a:hover { color: var(--ink); }

.essay {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 3rem) clamp(4rem, 8vw, 6rem);
}

.essay-title h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.essay-title .sub {
  margin-top: 0.7rem;
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--graphite);
}

.essay-title::after {
  content: "";
  display: block;
  width: 3.5rem;
  border-top: 1px solid var(--ink);
  margin: 2.6rem 0;
}

.essay-body {
  font-size: 1.125rem;
  line-height: 1.8;
}

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

.essay-body > p:first-child {
  font-size: 1.25rem;
  line-height: 1.7;
}

.essay-next {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2.4rem;
}

.essay-next .label { display: block; }

.essay-next a {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 1.4rem;
  font-weight: 330;
  text-decoration: none;
  line-height: 1.3;
  transition: opacity 0.25s ease;
}

.essay-next a:hover { opacity: 0.55; }

.essay-next .sub {
  margin-top: 0.2rem;
  font-style: italic;
  color: var(--graphite);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-portrait {
    width: min(24rem, 52vw);
    right: -3rem;
    opacity: 0.55;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .art-lead {
    grid-template-columns: 1fr;
  }

  .art-lead .art-figure {
    max-width: 24rem;
  }
}

@media (max-width: 640px) {
  .hero-body { padding: 3.2rem 0 0; }

  .hero-inner { min-height: 82vh; }

  .site-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .hero-portrait {
    position: relative;
    right: 0;
    align-self: flex-end;
    margin-right: -1.25rem;
    margin-top: 2rem;
    width: min(21rem, 84vw);
    opacity: 1;
    -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 6%, #000 55%, transparent 96%);
    mask-image: linear-gradient(to left, transparent 0%, #000 6%, #000 55%, transparent 96%);
  }

  .site-nav { gap: 1.2rem; }

  .site-nav a { font-size: 0.625rem; }

  .art-pair { grid-template-columns: 1fr; }

  .foot-meta { flex-direction: column; gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy,
  .hero-portrait { animation: none; }
}
