/* ============================================
   Michael D. Williamson — personal site
   Mid-century modern / jet-age theme
   ============================================ */

:root {
  --cream: #F3E7C9;
  --cream-2: #EADFBE;
  --ink: #2A211C;
  --ink-soft: #59493F;
  --orange: #E2572B;
  --orange-dark: #B8401C;
  --teal: #1C8F82;
  --teal-dark: #106259;
  --gold: #E8A93A;
  --sky: #4FA6C9;
  --line: rgba(42, 33, 28, 0.18);

  --font-display: 'League Spartan', sans-serif;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  position: relative;
}

/* halftone dot texture, like screen-printed poster stock */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: radial-gradient(circle, var(--ink) 1px, transparent 1.2px);
  background-size: 7px 7px;
}

a { color: inherit; }

.container { max-width: 700px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 4px solid var(--ink);
  padding: 20px 0;
  position: relative;
  z-index: 2;
  background: var(--cream);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: conic-gradient(from 45deg, var(--orange), var(--gold), var(--teal), var(--sky), var(--orange));
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.62rem;
  display: flex; align-items: center; justify-content: center;
}
.site-name {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.site-nav a {
  margin-left: 26px;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.15s ease;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 3px;
  background: var(--orange);
  transition: width 0.2s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--orange-dark); }
.site-nav a:hover::after, .site-nav a.active::after { width: 100%; }

/* mobile hamburger toggle (hidden on desktop) */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-label span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero-wrap { position: relative; overflow: hidden; background: var(--cream); }
.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  right: -320px; top: -260px;
  background: repeating-conic-gradient(
    var(--gold) 0deg 8deg,
    var(--orange) 8deg 16deg,
    var(--teal) 16deg 24deg,
    var(--cream) 24deg 32deg
  );
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}
.hero {
  position: relative;
  z-index: 1;
  padding-top: 100px;
  padding-bottom: 76px;
}
.hero .kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--teal);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 7px 16px;
  margin-bottom: 28px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  line-height: 1.18;
  color: var(--ink);
  text-shadow: 4px 4px 0 rgba(232, 169, 58, 0.55);
  margin: 0 0 30px;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--orange);
}
.hero .subhead {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 24px;
}
.hero .intro {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 44px;
}

.buttons { display: flex; gap: 20px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 3px solid var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--orange);
  color: var(--cream) !important;
  box-shadow: 6px 6px 0 var(--ink);
}
.btn-primary:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.btn-secondary {
  background: var(--cream);
  color: var(--ink) !important;
  box-shadow: 6px 6px 0 var(--teal);
}
.btn-secondary:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--teal); }

/* ---------- Page content ---------- */
main.page { padding: 68px 0 100px; position: relative; z-index: 1; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.01em;
  display: block;
  transform: skewX(-8deg);
  transform-origin: left center;
}

/* speed lines — jet-taking-off motion motif */
.speed-lines {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.speed-lines span {
  display: inline-block;
  height: 5px;
  border-radius: 3px;
  transform: skewX(-24deg);
}
.speed-lines span:nth-child(1) { width: 40px; background: var(--orange); }
.speed-lines span:nth-child(2) { width: 26px; background: var(--gold); }
.speed-lines span:nth-child(3) { width: 14px; background: var(--teal); }

.page-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--gold);
  margin: 0 0 48px;
}
.page-title em { color: var(--orange); font-style: normal; }

/* ---------- Article / post pages ---------- */
article .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cream);
  background: var(--ink);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
article h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.25;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--gold);
  margin: 0 0 16px;
}
.post-meta {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}
article p {
  font-size: 1.13rem;
  color: var(--ink-soft);
  margin: 0 0 26px;
}
article em { font-style: italic; color: var(--orange-dark); font-weight: 600; }
article p a {
  color: var(--orange-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
article p a:hover { color: var(--teal-dark); }

/* drop cap on the opening paragraph */
article p.lede::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 3.8rem;
  line-height: 0.75;
  float: left;
  padding: 8px 12px 0 0;
  color: var(--orange);
  text-shadow: 3px 3px 0 var(--gold);
}
/* when the opening word needs full styling (e.g. a contraction like "I've"),
   the word is wrapped in .dropcap-word and the default first-letter is turned off */
article p.lede.manual-cap::first-letter {
  font: inherit;
  float: none;
  padding: 0;
  color: inherit;
  text-shadow: none;
}
article p.lede .dropcap-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 3.8rem;
  line-height: 0.75;
  float: left;
  padding: 8px 12px 0 0;
  color: var(--orange);
  text-shadow: 3px 3px 0 var(--gold);
}

/* pull quote — retro poster call-out */
blockquote.pull-quote {
  margin: 48px 0;
  padding: 28px 32px;
  background: var(--teal);
  color: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--orange);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.4;
}
blockquote.pull-quote cite {
  display: block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  opacity: 0.85;
  text-transform: uppercase;
}

.post-nav {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 4px solid var(--ink);
}
.post-nav a {
  color: var(--orange-dark);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.post-nav a:hover { text-decoration: underline; }

/* ---------- Writing index ---------- */
.post-list-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 40px 0;
  border-bottom: 3px solid var(--line);
}
.post-list-item:first-child { padding-top: 0; }
.post-index-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cream);
  border: 3px solid var(--ink);
}
.post-list-item:nth-of-type(1) .post-index-num { background: var(--sky); }
.post-list-item:nth-of-type(2) .post-index-num { background: var(--orange); }
.post-list-item:nth-of-type(3) .post-index-num { background: var(--teal); }
.post-list-item:nth-of-type(4) .post-index-num { background: var(--gold); color: var(--ink); }
.post-date {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: block;
}
.post-list-item h2 { font-size: 1.4rem; margin: 0 0 12px; color: var(--ink); }
.post-list-item h2 a { text-decoration: none; transition: color 0.15s ease; }
.post-list-item h2 a:hover { color: var(--orange-dark); }
.post-excerpt { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 16px; }
.tags span {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 4px 12px;
  margin: 0 8px 8px 0;
}


/* ---------- About / Contact ---------- */
.bio p { font-size: 1.13rem; color: var(--ink-soft); margin: 0 0 24px; }
.bio p em { color: var(--orange-dark); font-style: italic; font-weight: 600; }
.contact-links { margin-top: 36px; }
.contact-links a {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.13rem;
  margin-bottom: 14px;
  color: var(--orange-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-links a:hover { color: var(--teal-dark); }

/* ---------- Reading page ---------- */
.page-intro {
  font-size: 1.13rem;
  color: var(--ink-soft);
  max-width: 68ch;
  margin: 0 0 24px;
}
.book-section-title {
  font-size: 1.35rem;
  color: var(--ink);
  margin: 52px 0 4px;
}
.book-section-title:first-of-type { margin-top: 40px; }
.book-list { margin: 0; }
.book-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.book-item:last-child { border-bottom: none; }
.book-item h3 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}
.book-item h3 a {
  color: var(--orange-dark);
  text-decoration: none;
}
.book-item h3 a:hover { color: var(--teal-dark); text-decoration: underline; }
.book-author {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.book-item p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Contact form ---------- */
.contact-form {
  margin-top: 40px;
  max-width: 480px;
}
.hidden-field { display: none; }
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}
.form-row label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 10px;
}
.form-row input,
.form-row textarea {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 12px 14px;
  resize: vertical;
  transition: box-shadow 0.15s ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--ink-soft); opacity: 0.6; }
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--orange);
}
.contact-form .btn {
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  padding: 32px 0;
}
.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  margin-bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    var(--orange) 0 12px,
    var(--gold) 12px 24px,
    var(--teal) 24px 36px
  );
}
.site-footer .container-wide { padding-top: 24px; }
.site-footer p {
  color: var(--cream-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  margin: 0;
}
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer a:hover { color: var(--cream); }

@media (max-width: 640px) {
  /* ----- header / nav ----- */
  .header-inner { flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .nav-toggle-label { display: flex; }
  .site-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav a {
    display: block;
    margin: 0;
    padding: 14px 4px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a::after { display: none; }
  .nav-toggle:checked ~ .site-nav { max-height: 400px; margin-top: 16px; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .site-name { font-size: 0.9rem; }

  /* ----- layout / spacing ----- */
  .container, .container-wide { padding: 0 32px; }
  main.page { padding: 48px 0 72px; }

  /* ----- hero ----- */
  .hero { padding-top: 48px; padding-bottom: 44px; }
  .hero h1 { margin-bottom: 22px; }
  .hero .subhead { font-size: 1.1rem; margin-bottom: 20px; }
  .hero .intro { font-size: 1rem; margin-bottom: 32px; }
  .buttons { flex-direction: column; gap: 14px; }
  .btn { width: 100%; text-align: center; padding: 15px 24px; }

  /* ----- article / post pages ----- */
  article h1 { line-height: 1.3; }
  article p { font-size: 1.05rem; }
  article p.lede::first-letter { font-size: 3rem; }
  article p.lede .dropcap-word { font-size: 3rem; }
  blockquote.pull-quote { padding: 22px; font-size: 1.15rem; margin: 36px 0; }
  .post-nav { display: flex; flex-direction: column; gap: 14px; }

  /* ----- writing index ----- */
  .post-list-item { grid-template-columns: 1fr; gap: 8px; padding: 32px 0; }

  /* ----- reading page ----- */
  .book-section-title { margin: 40px 0 4px; }
  .book-section-title:first-of-type { margin-top: 28px; }
  .book-item { padding: 24px 0; }

  /* ----- contact ----- */
  .contact-form { max-width: 100%; }
}

@media (max-width: 380px) {
  .site-name { display: none; }
}
