:root {
  --paper: #FFFEF8;
  --ink: #17161A;
  --yellow: #FFE94A;
  --blue: #2B4EFF;
  --red: #FF5C4D;
  --grid: rgba(43, 78, 255, .055);
}

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

body {
  background: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: 'Karla', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
}

.display { font-family: 'Archivo Black', sans-serif; line-height: 1.05; letter-spacing: -0.01em; font-weight: 400; }
.hand { font-family: 'Caveat', cursive; }
.mono { font-family: 'Space Mono', monospace; font-size: .8rem; letter-spacing: .02em; }
.eyebrow { color: var(--blue); margin-bottom: 14px; }

main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* draw-in animation for SVG doodles */
.draw-in path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease forwards .35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade-1, .fade-2, .fade-3, .fade-4 { opacity: 0; animation: rise .6s ease forwards; }
.fade-2 { animation-delay: .12s } .fade-3 { animation-delay: .28s } .fade-4 { animation-delay: .42s }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .draw-in path { animation: none; stroke-dashoffset: 0; }
  .fade-1, .fade-2, .fade-3, .fade-4 { animation: none; opacity: 1; }
}

/* NAV */
.nav { max-width: 1080px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { position: relative; font-family: 'Archivo Black', sans-serif; font-size: 1.35rem; color: var(--ink); text-decoration: none; padding-bottom: 6px; }
.logo span { color: var(--blue); }
.logo-squiggle { position: absolute; left: 0; bottom: -8px; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: 1rem; padding: 8px 12px; color: var(--ink); border-radius: 8px; }
.nav-links a.active, .nav-links a:hover { background: var(--yellow); }
.nav-cta { border: 2.5px solid var(--ink); border-radius: 999px; }

/* HERO */
.hero { padding: 72px 0 40px; }
.hero-h1 { font-size: clamp(3rem, 9vw, 6.2rem); }
.strike { position: relative; white-space: nowrap; }
.strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 52%;
  height: .09em; background: var(--red); transform: rotate(-2.5deg); border-radius: 4px;
}
.hero-hand { display: flex; align-items: flex-end; margin: 6px 0 20px; }
.hero-arrow { transform: rotate(10deg); margin-right: 4px; }
.hero-scrawl { font-size: clamp(2rem, 5.5vw, 3.2rem); color: var(--blue); font-weight: 700; transform: rotate(-2deg); }
.hero-sub { max-width: 560px; font-size: 1.15rem; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-block; font-family: 'Karla', sans-serif; font-weight: 700; font-size: 1rem; padding: 13px 24px; border-radius: 999px; cursor: pointer; border: 2.5px solid var(--ink); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-outline { background: transparent; color: var(--ink); }

/* SECTIONS */
section { padding: 64px 0; }
.section-head { margin-bottom: 36px; }
.section-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.section-head h2, .page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.hl { background: linear-gradient(transparent 55%, var(--yellow) 55%); }

/* PROBLEM CARDS */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 26px 24px; box-shadow: 5px 5px 0 var(--ink); }
.tilt-l { transform: rotate(-.6deg); } .tilt-r { transform: rotate(.7deg); }
.card-doodle { color: var(--blue); margin-bottom: 12px; }
.card h3 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 1.15rem; margin-bottom: 10px; }
.problem-note { margin-top: 26px; font-size: 1.45rem; color: var(--red); transform: rotate(-1deg); }

/* STORY */
.story-inner { display: grid; grid-template-columns: 280px 1fr; gap: 44px; align-items: center; }
.story-sketch { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px; box-shadow: 5px 5px 0 var(--yellow); transform: rotate(-1.2deg); }
.story p { margin-bottom: 16px; max-width: 60ch; }
.story .btn { margin-top: 6px; }
@media (max-width: 760px) { .story-inner { grid-template-columns: 1fr; } .story-sketch { max-width: 300px; } }

/* BLOG */
.page-head { padding: 64px 0 8px; }
.filters { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.chip { font-family: 'Space Mono', monospace; font-size: .8rem; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; cursor: pointer; }
.chip-on { background: var(--ink); color: var(--paper); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.post-grid.wide { padding-top: 32px; }
.post-card { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 24px; box-shadow: 5px 5px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.post-card:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--blue); }
.post-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; color: #666; }
.tag { padding: 3px 10px; border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); font-weight: 700; }
.tag-adaptation { background: var(--yellow); }
.tag-techadvances { background: #D6E0FF; }
.tag-pastexperience { background: #FFDAD6; }
.post-card h3 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 1.15rem; line-height: 1.25; margin-bottom: 10px; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { background: linear-gradient(transparent 60%, var(--yellow) 60%); }
.post-card p { font-size: .97rem; color: #333; }
.read-more { display: inline-block; margin-top: 14px; font-size: 1.3rem; color: var(--blue); text-decoration: none; }

/* ARTICLE */
.article { max-width: 700px; margin: 0 auto; padding: 56px 0 8px; }
.article .back { display: inline-block; font-size: 1.35rem; color: var(--blue); margin-bottom: 26px; text-decoration: none; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 14px 0 6px; }
.article-body p { margin: 22px 0; font-size: 1.08rem; }
.article-body h2 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 1.4rem; margin: 36px 0 6px; }
.article-body h3 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 1.15rem; margin: 28px 0 4px; }
.article-body ul, .article-body ol { margin: 22px 0; padding-left: 26px; }
.article-body li { margin: 8px 0; }
.article-body img { max-width: 100%; border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); }
.article-body blockquote { border-left: 4px solid var(--yellow); margin: 22px 0; padding: 4px 0 4px 18px; font-style: italic; }
.article-end { border-top: 2.5px dashed var(--ink); margin-top: 40px; padding-top: 18px; }
.signoff { font-size: 1.5rem; }

/* NEWSLETTER */
.newsletter-card { background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 18px; padding: 44px 36px; box-shadow: 7px 7px 0 var(--ink); transform: rotate(-.4deg); }
.newsletter-card h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin-bottom: 14px; }
.newsletter-card p { max-width: 56ch; }
.circled { position: relative; display: inline-block; padding: 0 .1em; }
.circled svg { position: absolute; inset: -18% -8%; width: 116%; height: 136%; pointer-events: none; }
.signup { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.signup input { flex: 1 1 240px; padding: 13px 18px; border: 2.5px solid var(--ink); border-radius: 999px; font-family: 'Karla', sans-serif; font-size: 1rem; background: var(--paper); }
.signup input:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.note { margin-top: 14px; font-size: 1.25rem; transform: rotate(-1deg); }

/* FOOTER */
.footer { background: var(--ink); color: var(--paper); margin-top: 60px; }
.footer-inner { max-width: 1080px; margin: 0 auto; padding: 48px 24px 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { font-family: 'Archivo Black', sans-serif; font-size: 1.4rem; margin-bottom: 6px; }
.footer-hand { color: var(--paper); font-size: 1.3rem; opacity: .9; }
.footer-links { display: flex; gap: 10px; align-items: flex-start; }
.footer-links a { border: 2px solid var(--paper); color: var(--paper); border-radius: 999px; padding: 8px 16px; font-weight: 700; text-decoration: none; }
.footer-links a:hover { background: var(--paper); color: var(--ink); }
.footer-base { max-width: 1080px; margin: 0 auto; padding: 0 24px 28px; opacity: .55; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* 404 */
.notfound { padding: 100px 0; text-align: center; }
.notfound h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); margin-bottom: 12px; }
.notfound .hand { font-size: 1.6rem; color: var(--red); }
