/* What I Learned: Kent's existing layout (header, photo hero, About, Latest posts, footer),
   rebuilt with better components. Palette taken from the fog-and-canoe hero photo. */
:root {
  --fog: #f3f4f2;
  --paper: #ffffff;
  --ink: #1d292e;
  --ink-2: #33434a;
  --slate: #5b6970;
  --rule: #d8ddda;
  --lake: #2b5566;
  --gold: #c38a2c;
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --text: "Libre Caslon Text", Georgia, serif;
  --ui: "Figtree", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: 32px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fog); color: var(--ink); font: 17px/1.6 var(--ui); }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* mockup bar */
.mockbar { background: var(--ink); color: #aab5b9; font: 13px/1 var(--ui); }
.mockbar .wrap { display: flex; align-items: center; min-height: 32px; }

/* buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 15px/1 var(--ui); letter-spacing: .01em;
  padding: 15px 24px; border-radius: 3px; border: 0; background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  transition: background-color .15s; }
.btn:hover { background: var(--lake); }
.btn.small { padding: 11px 18px; font-size: 14px; }
.textlink { font: 600 15px/1 var(--ui); color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.textlink:hover { color: var(--lake); }

/* header */
.site-head { position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 36px; min-height: 84px; }
.wordmark { font: 400 26px/1 var(--display); text-decoration: none; letter-spacing: .005em; margin-right: auto; }
.nav { display: flex; align-items: center; gap: 30px; font: 500 15px/1 var(--ui); }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-color: currentColor; }
.nav a[aria-current] { border-color: var(--ink); }
.page-home .site-head { position: absolute; left: 0; right: 0; }

/* hero: the photo is pale fog at the top, so the type sits directly on it */
.hero { position: relative; height: min(92vh, 900px); min-height: 620px; overflow: hidden; background: #fbfbfb; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.hero .wrap { position: relative; padding-top: clamp(150px, 20vh, 220px); }
.hero h1 { font: 400 clamp(64px, 9.5vw, 136px)/.92 var(--display); letter-spacing: -.015em; margin: 0; max-width: 8ch; }
.hero p { font: 400 21px/1.5 var(--ui); color: var(--ink-2); max-width: 28ch; margin: 28px 0 36px; }
.hero .actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .hero img { animation: settle 2.4s cubic-bezier(.2,.7,.2,1) both; }
  .hero .wrap > * { animation: appear .9s ease-out both; }
  .hero p { animation-delay: .15s; }
  .hero .actions { animation-delay: .3s; }
  @keyframes settle { from { transform: scale(1.06); } }
  @keyframes appear { from { opacity: 0; transform: translateY(8px); } }
}

/* about */
.about { padding: 152px 0 136px; }
.about .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--gutter); align-items: center; }
.about .photos { grid-column: 1 / span 6; position: relative; padding-bottom: 72px; }
.about .photos .a { width: 78%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 50%; }
.about .photos .b { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1; object-fit: cover; border: 10px solid var(--fog); }
.about .copy { grid-column: 8 / span 5; }
.about h2 { font: 400 clamp(44px, 5vw, 64px)/1 var(--display); margin: 0 0 28px; letter-spacing: -.01em; }
.about p { font: 400 20px/1.7 var(--text); margin: 0 0 32px; color: var(--ink-2); }

/* latest posts */
.latest { background: var(--paper); padding: 120px 0 136px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 48px;
  padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.section-head h2 { font: 400 clamp(38px, 4vw, 52px)/1 var(--display); margin: 0; letter-spacing: -.01em; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px var(--gutter); }
.card { text-decoration: none; display: flex; flex-direction: column; }
.card .img { overflow: hidden; margin-bottom: 22px; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.03); }
.card time { font: 500 14px/1 var(--ui); color: var(--slate); }
.card h3 { font: 400 24px/1.25 var(--text); margin: 12px 0 12px; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.card p { font: 400 17px/1.6 var(--text); color: var(--slate); margin: 0; }
.card.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 7fr 5fr; gap: 0 56px; align-items: center; padding-bottom: 56px; border-bottom: 1px solid var(--rule); }
.card.lead .img { margin: 0; }
.card.lead img { aspect-ratio: 3 / 2; }
.card.lead h3 { font-family: var(--display); font-size: clamp(36px, 3.6vw, 50px); line-height: 1.06; margin: 16px 0 18px; }
.card.lead p { font-size: 19px; }

/* footer */
.site-foot { background: var(--ink); color: #dfe5e6; padding: 88px 0 40px; }
.site-foot .top { display: grid; grid-template-columns: 5fr 2fr 5fr; gap: var(--gutter); padding-bottom: 72px; }
.site-foot .wordmark { color: #fff; display: inline-block; margin-bottom: 14px; }
.site-foot .blurb { color: #aab5b9; margin: 0; max-width: 32ch; }
.site-foot nav { display: grid; gap: 12px; align-content: start; font-size: 15px; }
.site-foot nav a { text-decoration: none; color: #dfe5e6; }
.site-foot nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-foot h2 { font: 400 24px/1.25 var(--text); color: #fff; margin: 0 0 18px; }
.foot-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.foot-form input { font: 16px var(--ui); padding: 14px 14px; border-radius: 3px; border: 1px solid #45555c; background: #243238; color: #fff; min-width: 0; }
.foot-form input::placeholder { color: #8e9a9f; }
.foot-form .btn { background: #fff; color: var(--ink); }
.foot-form .btn:hover { background: #dfe5e6; }
.foot-note { font-size: 14px; color: #aab5b9; margin: 12px 0 0; min-height: 1.4em; }
.site-foot .bottom { border-top: 1px solid #34444a; padding-top: 28px; font-size: 14px; color: #8e9a9f; }

/* page heads (blog, about) */
.page-head { padding: 72px 0 40px; }
.page-head h1 { font: 400 clamp(56px, 7vw, 96px)/.95 var(--display); margin: 0; letter-spacing: -.015em; }

/* blog index */
.finder { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 20px 0 22px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.finder input { flex: 0 1 360px; font: 16px var(--ui); padding: 12px 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink); }
.topics { display: flex; flex-wrap: wrap; gap: 6px 22px; font: 500 15px/1 var(--ui); }
.topics button { font: inherit; color: var(--slate); background: none; border: 0; padding: 6px 0; cursor: pointer; border-bottom: 1px solid transparent; }
.topics button:hover { color: var(--ink); }
.topics button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.index { list-style: none; margin: 0 0 120px; padding: 0; }
.index a { display: grid; grid-template-columns: 220px 1fr 140px; gap: var(--gutter); align-items: center; padding: 28px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.index img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.index h2 { font: 400 25px/1.25 var(--text); margin: 0 0 8px; }
.index a:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.index p { font: 400 17px/1.55 var(--text); color: var(--slate); margin: 0; max-width: 56ch; }
.index time { font: 500 14px/1.4 var(--ui); color: var(--slate); text-align: right; }
.none { padding: 48px 0 120px; color: var(--slate); }

/* post */
.post-head { max-width: 860px; margin: 0 auto; padding: 72px var(--gutter) 48px; }
.post-head .meta { font: 500 15px/1.4 var(--ui); color: var(--slate); }
.post-head h1 { font: 400 clamp(48px, 6.5vw, 84px)/1 var(--display); letter-spacing: -.015em; margin: 16px 0 0; }
.post-photo { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.post-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body { max-width: 700px; margin: 0 auto; padding: 64px var(--gutter) 0; font: 400 20px/1.75 var(--text); }
.post-body p { margin: 0 0 1.15em; }
.post-body > p:first-child { font-size: 23px; line-height: 1.6; }
.post-body figure { margin: 48px 0; }
.post-body figure img { width: 100%; }
.post-body figcaption { font: 400 14px/1.5 var(--ui); color: var(--slate); margin-top: 12px; }
.lines { display: grid; gap: 14px; margin: 8px 0 28px; }
.lines i { display: block; height: 12px; background: #e3e7e5; }
.lines i:nth-child(3n) { width: 88%; }
.lines i:nth-child(5n) { width: 64%; }
.player { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px 20px; background: var(--paper); border: 1px solid var(--rule); margin: 40px 0; font-family: var(--ui); }
.player button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.player b { display: block; font: 600 15px/1.3 var(--ui); }
.player .bar { height: 3px; background: var(--rule); margin-top: 10px; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--lake); }
.player time { font: 500 14px var(--ui); color: var(--slate); }
.filed { font: 500 15px/1.5 var(--ui); color: var(--slate); margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); }
.filed a { color: var(--ink); }
.post-sub { background: var(--paper); border: 1px solid var(--rule); padding: 28px 28px; margin: 48px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.post-sub h2 { font: 400 22px/1.3 var(--text); margin: 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin: 48px 0 0; font-family: var(--ui); }
.pager a { text-decoration: none; }
.pager small { display: block; font-size: 14px; color: var(--slate); margin-bottom: 4px; }
.pager b { font: 400 19px/1.35 var(--text); }
.pager a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.pager .next { text-align: right; }

/* comments */
.comments { max-width: 700px; margin: 0 auto; padding: 88px var(--gutter) 128px; }
.comments h2 { font: 400 36px/1 var(--display); margin: 0 0 24px; }
.comment { padding: 20px 0; border-top: 1px solid var(--rule); }
.comment b { font: 600 15px var(--ui); }
.comment time { font: 14px var(--ui); color: var(--slate); margin-left: 10px; }
.comment p { font: 400 18px/1.6 var(--text); margin: 8px 0 0; }
.empty { color: var(--slate); margin: 0; }
.c-form { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 8px; font: 600 14px/1 var(--ui); }
.c-form input, .c-form textarea, dialog input { font: 16px/1.4 var(--ui); padding: 13px 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink); width: 100%; }
.c-form textarea { min-height: 140px; resize: vertical; }
.c-form .btn { justify-self: start; }
.c-note { font: 15px/1.5 var(--ui); padding: 14px 16px; background: #e6ecec; margin: 0; }

/* about page */
.about-page { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; padding-bottom: 136px; align-items: start; }
.slot { aspect-ratio: 4 / 5; background: #e3e7e5; display: grid; place-items: center; color: var(--slate); font: 500 15px var(--ui); }
.about-page .lines { margin-top: 12px; }
.about-page .lines i { height: 14px; }

/* subscribe popup */
dialog.sub { border: 0; padding: 0; width: min(460px, calc(100% - 32px)); background: var(--fog); color: var(--ink); box-shadow: 0 40px 100px rgba(20, 30, 34, .35); }
dialog.sub::backdrop { background: rgba(29, 41, 46, .6); }
dialog.sub .inner { padding: 44px 40px 40px; }
dialog.sub h2 { font: 400 40px/1 var(--display); margin: 0 0 12px; }
dialog.sub p { margin: 0 0 28px; color: var(--ink-2); }
dialog.sub form { display: grid; gap: 16px; }
dialog.sub .x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font: 28px/1 var(--ui); color: var(--slate); cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  dialog.sub[open] { animation: lift .25s cubic-bezier(.2,.7,.2,1); }
  @keyframes lift { from { opacity: 0; transform: translateY(12px); } }
}

/* smaller screens */
@media (max-width: 960px) {
  .about .photos { grid-column: 1 / -1; margin-bottom: 56px; }
  .about .copy { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card.lead { grid-template-columns: 1fr; gap: 24px; }
  .site-foot .top { grid-template-columns: 1fr 1fr; }
  .site-foot .top > :last-child { grid-column: 1 / -1; }
  .index a { grid-template-columns: 160px 1fr; }
  .index time { grid-column: 2; text-align: left; order: -1; }
  .about-page { grid-template-columns: 1fr; gap: 40px; }
  .about-page .slot { max-width: 360px; }
}
@media (max-width: 620px) {
  :root { --gutter: 16px; }
  .site-head .wrap { min-height: 68px; gap: 18px; }
  .wordmark { font-size: 22px; }
  .nav { gap: 16px; font-size: 14px; }
  .nav .btn { display: none; }
  .hero { min-height: 0; height: 760px; }
  .hero img { top: 250px; height: calc(100% - 250px); object-position: 78% 40%; }
  .hero .wrap { padding-top: 104px; }
  .hero p { font-size: 18px; }
  .about { padding: 88px 0; }
  .latest { padding: 80px 0 96px; }
  .cards { grid-template-columns: 1fr; gap: 48px; }
  .foot-form { grid-template-columns: 1fr; }
  .site-foot .top { grid-template-columns: 1fr; }
  .index a { grid-template-columns: 1fr; gap: 14px; }
  .index time { grid-column: 1; }
  .post-body { font-size: 19px; }
  .post-body > p:first-child { font-size: 21px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  dialog.sub .inner { padding: 40px 24px 28px; }
}
