/* Chris Chomenko — personal site
   Editorial, warm, quiet. One serif (Newsreader), one sans (Inter). */

:root {
  --paper: #faf6ef;
  --ink: #2b2620;
  --faint: #6f675c;
  --rule: #e4dccd;
  --accent: #84cc16; /* lime green */
  --accent-dark: #4d7c0f; /* lime hover / dark text on light */
  --accent-text: #1c3001; /* dark text for use ON lime backgrounds */
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #efe3d0; }

.page {
  max-width: 65ch;
  margin: 0 auto;
  padding: 0 22px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Masthead */
.masthead {
  padding: 52px 0 0;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.masthead .name {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.masthead .name:hover { text-decoration: none; color: var(--accent); }
.masthead nav { display: flex; gap: 22px; }
.masthead nav a { color: var(--faint); }
.masthead nav a:hover { color: var(--accent); text-decoration: none; }
.masthead nav a.here { color: var(--ink); }

/* Content */
main { padding: 72px 0 40px; }

h1 {
  font-weight: 500;
  font-size: clamp(30px, 5.5vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 30px;
}

h2 {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  margin: 56px 0 18px;
}

p { margin-bottom: 22px; }
p.lede { font-size: 21px; color: var(--ink); }

em { font-style: italic; }
strong { font-weight: 600; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 56px 0;
}

.muted { color: var(--faint); }

.smallcaps {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Blog list */
.post-list { list-style: none; margin: 34px 0; }
.post-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.post-list li:first-child { border-top: 1px solid var(--rule); }
.post-list a.title {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.post-list a.title:hover { color: var(--accent); text-decoration: none; }
.post-list .date {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 13px;
  color: var(--faint);
}
.post-list p { margin: 6px 0 0; font-size: 17px; color: var(--faint); }

/* Article */
article .date {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--faint);
  display: block;
  margin-bottom: 14px;
}
article h1 { margin-bottom: 34px; }
article ul { margin: 0 0 22px 1.2em; }
article li { margin-bottom: 8px; }
blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: var(--faint);
}
.backlink {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 14px;
}

/* Book presentation */
.book-flex {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 22px;
}
.book-info { flex: 1 1 0; min-width: 0; }
.book-info h2 { margin-top: 0; }
.book-cover-wrap {
  flex: 0 0 190px;
  perspective: 1200px;
  padding: 8px 0 20px;
}
.book-3d {
  position: relative;
  width: 190px;
  transform-style: preserve-3d;
  transform: rotateY(-14deg);
  transition: transform 0.45s ease;
}
.book-cover-wrap:hover .book-3d { transform: rotateY(-6deg); }
.book-3d img {
  display: block;
  position: relative;
  width: 190px;
  height: auto;
  border-radius: 2px 4px 4px 2px;
  transform: translateZ(13px);
  background: #211b15;
}
.book-3d::before {
  /* page edges */
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: calc(100% - 8px);
  transform: translateX(calc(190px - 12px - 4px)) rotateY(90deg) translateX(12px);
  background: linear-gradient(90deg,
    #f4ecdd 0%, #e2d8c4 6%, #f4ecdd 12%, #e2d8c4 18%, #f4ecdd 24%,
    #e2d8c4 30%, #f4ecdd 36%, #e2d8c4 42%, #f4ecdd 48%, #e2d8c4 54%,
    #f4ecdd 60%, #e2d8c4 66%, #f4ecdd 72%, #e2d8c4 78%, #f4ecdd 84%,
    #e2d8c4 90%, #f4ecdd 100%);
}
.book-3d::after {
  /* back cover + shadow */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 190px;
  height: 100%;
  transform: translateZ(-13px);
  background: #1a1510;
  border-radius: 0 4px 4px 0;
  box-shadow: -14px 14px 34px rgba(43, 38, 32, 0.32);
}

/* Waitlist form */
.waitlist { margin: 26px 0 8px; }
.waitlist form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.waitlist input[type="email"] {
  flex: 1 1 240px;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 15.5px;
  padding: 12px 14px;
  border: 1px solid #cfc5b2;
  border-radius: 4px;
  background: #fffdf9;
  color: var(--ink);
  outline: none;
}
.waitlist input[type="email"]:focus { border-color: var(--accent); }
.waitlist button {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
.waitlist button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #faf6ef; }
.waitlist button:disabled { opacity: 0.6; cursor: default; }
.waitlist .note {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--faint);
  margin-top: 10px;
}
.waitlist .msg {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 14.5px;
  margin-top: 12px;
  display: none;
}
.waitlist .msg.ok { display: block; color: #3d6b3f; }
.waitlist .msg.err { display: block; color: #a33a2a; }

/* Connect */
.connect { list-style: none; margin: 26px 0; }
.connect li { margin-bottom: 10px; }
.connect .label {
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 13px;
  color: var(--faint);
  display: inline-block;
  width: 84px;
}

/* Footer */
footer {
  padding: 40px 0 64px;
  border-top: 1px solid var(--rule);
  margin-top: 56px;
  font-family: "Inter", -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--faint);
}
footer a { color: var(--faint); }

@media (max-width: 600px) {
  body { font-size: 18px; }
  main { padding: 52px 0 28px; }
  .masthead { padding-top: 36px; }
  .book-flex {
    flex-direction: column;
    align-items: center;
    gap: 26px;
  }
  .book-cover-wrap { flex: 0 0 auto; padding: 12px 0 8px; }
  .book-info { width: 100%; }
}
