/* ============================================================
   Alexander Pennington — personal site, doodle edition
   Essence: cream paper, ink line-art characters, vivid orange,
   chunky bubble display type with hard offset shadows.
   Type: Titan One (bubble display) / Karla (body) / Caveat (notes)
   ============================================================ */

:root {
  --paper: #FEF6EC;        /* warm cream background */
  --ink: #211B14;          /* warm near-black lines + text */
  --orange: #F25C22;       /* vivid orange, the MAIFEI brush color */
  --orange-deep: #D8430E;
  --amber: #FFB020;
  --card: #FFFFFF;
  --muted: #7A6E5F;        /* warm gray secondary text */
  --border: var(--ink);
  --display: "Titan One", sans-serif;
  --body: "Karla", sans-serif;
  --hand: "Caveat", cursive;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 7rem;
  --radius: 16px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--orange); }

::selection { background: var(--orange); color: var(--paper); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- display type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0;
}

.caveat {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--orange);
}

/* ---------- doodles ---------- */
.doodle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  position: absolute;
  pointer-events: none;
}

.doodle .dash { stroke-dasharray: 2 7; }
.doodle .steam { stroke-dasharray: 4 6; }

.card-doodle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 64px;
  height: 56px;
  margin-bottom: var(--space-2);
}
.card-doodle .dash { stroke-dasharray: 2 6; }

/* gentle idle motion */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  50%      { transform: translateY(-10px) rotate(var(--tilt, 0deg)); }
}
.float-a { --tilt: -4deg; animation: floaty 5s ease-in-out infinite; }
.float-b { --tilt: 3deg;  animation: floaty 6s ease-in-out 0.8s infinite; }
.float-c { --tilt: -6deg; animation: floaty 4.5s ease-in-out 0.4s infinite; }

@keyframes slow-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin-slow { animation: slow-spin 24s linear infinite; }

/* tilted paper-scrap pieces */
.tilt-l { transform: rotate(-1.5deg); }
.tilt-r { transform: rotate(1.5deg); }

/* ---------- scroll road + bike ---------- */
.road {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  z-index: 100;
  pointer-events: none;
}

.road-line {
  position: absolute;
  inset: 0;
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent);
}

.rider {
  position: absolute;
  top: 2px;
  left: 0;
  transform: translateX(-10px);
  color: var(--ink);
  will-change: transform;
}

.rider::before {
  content: "";
  position: absolute;
  top: -2px;
  right: 100%;
  width: 100vw;
  height: 5px;
  background: var(--orange);
  margin-right: -34px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}

.nav-name {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 180ms ease-out;
}

.nav-links a:hover { color: var(--orange); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out,
              background-color 180ms ease-out, color 180ms ease-out;
  touch-action: manipulation;
}

.btn:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-primary {
  background: var(--orange);
  color: #FFF6ED;
}
.btn-primary:hover { background: var(--orange-deep); }

.btn-ghost { background: var(--paper); }
.btn-ghost:hover { color: var(--orange); }

.btn-light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-small { padding: 0.55rem 1.15rem; font-size: 0.9rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: calc(100dvh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5) clamp(1rem, 5vw, 4rem) var(--space-4);
  max-width: 72rem;
  margin: 0 auto;
}

.hero-bigword {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%) rotate(-4deg);
  font-family: var(--display);
  font-size: clamp(8rem, 30vw, 24rem);
  color: var(--orange);
  opacity: 0.16;
  letter-spacing: -0.02em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.doodle-writer { width: clamp(90px, 12vw, 150px); height: auto; right: clamp(1rem, 6vw, 6rem); top: 12%; }
.doodle-moto   { width: clamp(120px, 16vw, 210px); height: auto; right: clamp(2rem, 10vw, 10rem); bottom: 14%; }
.doodle-book   { width: clamp(60px, 8vw, 100px); height: auto; left: clamp(0.5rem, 3vw, 3rem); top: 16%; }
.doodle-star1  { width: 26px; height: 26px; left: 12%; bottom: 24%; }
.doodle-star2  { width: 18px; height: 18px; right: 30%; top: 8%; }

@media (max-width: 820px) {
  .doodle-writer { top: 6%; }
  .doodle-moto { bottom: 6%; right: 0.5rem; }
}

.eyebrow {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 var(--space-2);
}

.hero-title {
  position: relative;
  font-size: clamp(2.8rem, 9.5vw, 7.5rem);
  margin: 0;
  text-shadow: 0.06em 0.06em 0 color-mix(in srgb, var(--ink) 18%, transparent);
}

.hero-title .line {
  display: block;
  animation: rise 600ms ease-out backwards;
}
.hero-title .line:nth-child(2) { animation-delay: 120ms; }
.hero-title .line:nth-child(3) { animation-delay: 240ms; }

.bubble-orange {
  color: var(--orange);
  position: relative;
  text-shadow: 0.06em 0.06em 0 var(--ink);
}

.hero-note {
  position: absolute;
  bottom: 92%;
  right: 0;
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
  transform: rotate(-3deg);
  white-space: nowrap;
  text-shadow: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.4em); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  max-width: 34rem;
  font-size: 1.2rem;
  color: var(--muted);
  margin: var(--space-3) 0 var(--space-4);
  position: relative;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  position: relative;
}

.hero-scroll {
  margin-top: auto;
  padding-top: var(--space-4);
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--muted);
}

/* ---------- sections ---------- */
.section {
  padding: var(--space-6) clamp(1rem, 5vw, 4rem);
  max-width: 72rem;
  margin: 0 auto;
  position: relative;
}

.section-head { margin-bottom: var(--space-4); }

.section-label {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--orange);
  margin: 0 0 var(--space-1);
}

.section-label-light { color: var(--paper); }

.section-head h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: var(--space-2);
  text-shadow: 0.05em 0.05em 0 color-mix(in srgb, var(--ink) 15%, transparent);
}

.section-sub {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 36rem;
  margin: 0;
}

.center { text-align: center; }

.small-note { margin-top: var(--space-2); }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-4);
  align-items: start;
}

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

.about-photo { position: relative; }

.photo-frame {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  padding: 10px 10px 0;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  transition: transform 250ms ease-out;
}

.photo-frame:hover { transform: rotate(0deg) scale(1.01); }

.photo-frame img { border-radius: 8px; }

.photo-caption {
  text-align: center;
  margin-top: var(--space-3);
}

.doodle-arrow {
  width: 54px;
  height: 36px;
  right: -8px;
  top: -30px;
  transform: rotate(20deg);
}

.about-copy p { margin: 0 0 var(--space-2); }

.about-facts {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
  border-top: 2px solid var(--ink);
}

.about-facts li {
  padding: 0.7rem 0;
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent);
}

.fact-k {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

/* ---------- services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

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

.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.card:hover {
  transform: translate(-3px, -3px) rotate(0deg);
  box-shadow: 8px 8px 0 var(--ink);
}

.card h3 { font-size: 1.25rem; margin-bottom: var(--space-2); }

.card p { margin: 0 0 var(--space-2); color: var(--muted); }

.card-price { margin-top: auto; }

.card-link {
  font-weight: 700;
  text-decoration: none;
  margin-top: var(--space-1);
}
.card-link:hover { text-decoration: underline; }

/* ---------- books ---------- */
.books {
  display: grid;
  gap: var(--space-5);
}

.book {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--space-4);
  align-items: center;
}

.book:nth-child(even) .book-cover { order: 2; }

@media (max-width: 720px) {
  .book { grid-template-columns: 1fr; }
  .book:nth-child(even) .book-cover { order: 0; }
  .book-cover { max-width: 260px; }
}

.book-cover {
  display: block;
  border: 3px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 250ms ease-out, box-shadow 250ms ease-out;
}

.book-cover:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 8px 8px 0 var(--ink);
}

.book-info h3 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  margin-bottom: var(--space-2);
}

.book-hook {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0 0 var(--space-3);
}

.book-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- community (orange spread) ---------- */
.section-accent {
  max-width: none;
  background: var(--orange);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  color: #FFF6ED;
}

.section-inner { max-width: 72rem; margin: 0 auto; }

.section-accent h2 { color: #FFF6ED; text-shadow: 0.05em 0.05em 0 var(--ink); }

.section-accent .section-sub { color: #FFE3CE; }

.caveat-light { color: #FFE3CE; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

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

.stat {
  text-align: center;
  padding: var(--space-3);
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-n {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--orange);
}

.stat-l { color: var(--muted); }

.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

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

.quote {
  margin: 0;
  padding: var(--space-3);
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.quote p { margin: 0 0 var(--space-1); font-size: 1.1rem; }

.quote cite {
  color: var(--muted);
  font-style: normal;
  font-size: 0.95rem;
}

/* ---------- social proof ---------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  text-align: center;
}

@media (max-width: 720px) {
  .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.proof-n {
  display: block;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.5rem;
  color: var(--orange);
  text-shadow: 0.05em 0.05em 0 color-mix(in srgb, var(--ink) 25%, transparent);
}

.proof-l { color: var(--muted); font-size: 0.95rem; }

.tweet {
  max-width: 34rem;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow);
}

.tweet-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-2);
}

.tweet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: #FFF6ED;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  flex-shrink: 0;
}

.tweet-head strong { display: block; }

.tweet-handle { color: var(--muted); font-size: 0.9rem; }

.tweet-body { font-size: 1.15rem; margin: 0 0 var(--space-2); }

.tweet-foot { margin: 0; color: var(--muted); }

/* ---------- contact ---------- */
.contact-wrap { position: relative; }

.contact-form { max-width: 34rem; }

.doodle-mail {
  width: clamp(100px, 14vw, 170px);
  height: auto;
  right: clamp(0rem, 8vw, 8rem);
  top: 10%;
}

@media (max-width: 900px) {
  .doodle-mail { display: none; }
}

.field { margin-bottom: var(--space-3); }

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 5px 5px 0 var(--orange);
}

.field textarea { resize: vertical; }

.form-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: var(--space-2);
}

/* ---------- footer ---------- */
.footer {
  border-top: 3px solid var(--ink);
  padding: var(--space-5) clamp(1rem, 5vw, 4rem);
  text-align: center;
  position: relative;
}

.doodle-footer-bike {
  position: static;
  width: 64px;
  height: 40px;
  margin: 0 auto var(--space-2);
  display: block;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-joke {
  font-size: 1.4rem;
  margin: 0 0 var(--space-3);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.footer-socials a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: color 180ms ease-out;
}

.footer-socials a:hover { color: var(--orange); }

.footer-fine { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
