/* shinex.dev - hand-drawn and playful: warm white, black line, one yellow accent.
   Radius rule: cards 20px, everything clickable is a pill.
   Nothing on the page is fixed or stacked over other content, every block sits in normal flow. */

@font-face {
  font-family: "Nunito";
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-400-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #FFFDF8;
  --surface: #FFFFFF;
  --ink: #17171B;
  --muted: #5F5F68;
  --accent: #FFC83D;
  --hair: rgb(23 23 27 / 0.14);

  --display: "Nunito", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --bouncy: cubic-bezier(0.2, 1.3, 0.5, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --line: 2.5px;
  --radius: 20px;
  --header: 4.75rem;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4.5vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 0.95rem/1.75 var(--mono);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

main { flex: 1; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1.1rem;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 0.75rem; }

/* ---------- header: a solid bar that stays on top while the page scrolls under it ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: var(--header);
  padding-inline: var(--gutter);
  background: var(--bg);
  border-bottom: var(--line) solid var(--hair);
}
.brand { justify-self: start; padding-block: 0.4rem; }

/* logo: the name written as a code tag, brackets step apart on hover */
.logo { font: 400 1.25rem/1 var(--mono); letter-spacing: -0.01em; white-space: nowrap; }
.logo b { display: inline-block; font-weight: 400; color: #B87C00; transition: transform 0.35s var(--bouncy); }
a:hover > .logo b:first-child { transform: translateX(-0.2em); }
a:hover > .logo b:last-child { transform: translateX(0.2em); }

.pills { display: flex; gap: 0.5rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1.05rem;
  border: var(--line) solid var(--ink);
  border-radius: 99px;
  background: var(--bg);
  font: 800 0.92rem/1.5 var(--display);
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.35s var(--bouncy);
}
.pill svg { width: 1em; height: 1em; fill: currentColor; }
.pill:hover { background: var(--accent); transform: translateY(-2px) rotate(-1.5deg); }
.pill:active { transform: scale(0.96); }
.pill[aria-current] { background: var(--ink); color: var(--bg); }

@media (max-width: 30rem) {
  .top { grid-template-columns: auto 1fr; }
  .logo { font-size: 1.05rem; }
  .pills { justify-self: end; }
  .pill { padding-inline: 0.8rem; font-size: 0.85rem; }
}
/* very narrow phones: the brackets go, the name stays */
@media (max-width: 22.5rem) {
  .logo b { display: none; }
}

/* ---------- home: greeting, name, character ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  min-height: calc(100dvh - var(--header));
  padding-inline: var(--gutter);
  overflow: hidden;
  text-align: center;
}
.hero-text { align-self: center; padding-block: clamp(1.5rem, 5dvh, 4rem) clamp(1rem, 3dvh, 2.5rem); }

.typed-line { font-size: clamp(1.25rem, 0.9rem + 2.6vw, 3.25rem); line-height: 1.3; letter-spacing: 0.08em; }
.typed { padding-right: 0.15em; border-right: 0.08em solid var(--ink); animation: caret 0.7s steps(1) infinite; }
@keyframes caret { 50% { border-right-color: transparent; } }

.title {
  margin-top: 0.06em;
  font-size: clamp(3.5rem, 1rem + 15vw, 12rem);
  line-height: 1;
  text-transform: uppercase;
}

.dude {
  width: auto;
  height: clamp(14rem, 40dvh, 32rem);
  overflow: visible;
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dude .ink { fill: var(--ink); }
.dude .none { fill: none; }
.dude .thin { stroke-width: 6; }
.dude .strand { stroke: var(--bg); }
.dude .spark { fill: var(--accent); }

.scroll-hint {
  position: absolute;
  right: clamp(1rem, 3vw, 3rem);
  bottom: clamp(1.5rem, 12dvh, 7rem);
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: clamp(0.85rem, 0.7rem + 0.6vw, 1.15rem);
}
.scroll-hint svg { width: 1.2em; height: 1.2em; margin-right: 0.35em; fill: currentColor; }
.wave span { display: inline-block; white-space: pre; }

@media (max-width: 46rem) {
  .scroll-hint { display: none; }
}

/* Entrance order: the greeting types itself, then the name and the character rise.
   Hidden states exist only with scripting on, and a 6s fallback shows everything anyway. */
@media (prefers-reduced-motion: no-preference) {
  .js .typed-line { opacity: 0; animation: show 0.01s linear 6s forwards; }
  .js .is-typing .typed-line, .js .is-typed .typed-line { opacity: 1; animation: none; }

  .js .title { opacity: 0; transform: translateY(7rem); animation: show 0.01s linear 6s forwards; }
  .js .is-typed .title { animation: rise 0.8s var(--bouncy) both; }

  .js .dude-wrap { opacity: 0; transform: translateY(7rem); animation: show 0.01s linear 6s forwards; }
  .js .is-typed .dude-wrap { animation: rise 1.1s var(--bouncy) 0.1s both; }

  .js .scroll-hint { opacity: 0; animation: show 0.01s linear 6s forwards; }
  .js .is-typed .scroll-hint { animation: fade 0.7s var(--ease) 1s both; }

  .dude .arm { transform-origin: 304px 418px; animation: wave-arm 1.6s ease-in-out infinite; }
  .dude .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
  .dude .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
  .dude .spark + .spark { animation-delay: -1.2s; }
  .wave span { animation: wave 2s ease-in-out calc(var(--n) * 70ms) infinite; }
}
@keyframes show { to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(7rem); } to { opacity: 1; transform: none; } }
@keyframes wave-arm { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(7deg); } }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(0.55) rotate(20deg); } }
@keyframes wave { 50% { transform: translateY(-0.33rem); } }

/* ---------- what I do ---------- */

.panel {
  border-top: var(--line) solid var(--ink);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.panel h2 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
.panel-note { margin-top: 0.8rem; max-width: 34rem; color: var(--muted); }

.rows { margin-top: clamp(1.75rem, 4vw, 3rem); border-bottom: var(--line) solid var(--hair); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  gap: 0.6rem clamp(1.5rem, 5vw, 4.5rem);
  padding-block: clamp(1.4rem, 3vw, 2.2rem);
  border-top: var(--line) solid var(--hair);
}
.row h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; }
.row p { max-width: 38rem; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tags li { padding: 0.05rem 0.7rem; border: 2px solid var(--ink); border-radius: 99px; font-size: 0.8rem; }

@media (max-width: 46rem) {
  .row { grid-template-columns: 1fr; }
}

/* ---------- inner pages ---------- */

.page-head { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(3rem, 1rem + 10vw, 7.5rem); text-transform: uppercase; }
.page-head p { margin-top: 1.1rem; max-width: 36rem; color: var(--muted); font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.15rem); }

.group { padding-block: clamp(2rem, 5vw, 3.5rem); scroll-margin-top: calc(var(--header) + 1rem); }
.group:last-of-type { padding-bottom: clamp(4rem, 9vw, 7rem); }
.group > h2 { display: inline-block; font-size: clamp(1.9rem, 4vw, 3rem); }
.group > h2 span { background: linear-gradient(transparent 62%, var(--accent) 62% 92%, transparent 92%); padding-inline: 0.1em; }
.group-note { margin-top: 0.6rem; color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.9rem);
  margin-top: clamp(1.4rem, 3vw, 2.25rem);
  /* room for the offset shadow so it is never cut by the page edge */
  padding: 0 0.6rem 0.6rem 0;
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0.35rem 0.35rem 0 var(--ink);
  transition: transform 0.4s var(--bouncy), box-shadow 0.4s var(--bouncy);
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 0.6rem 0.6rem 0 var(--accent); }
.card-shot { display: block; overflow: hidden; border-bottom: var(--line) solid var(--ink); background: var(--hair); }
.card-shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.card-body { display: flex; flex-direction: column; align-items: start; flex: 1; padding: clamp(1.1rem, 2.5vw, 1.7rem); }
.card h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; }
.card p { margin-top: 0.6rem; color: var(--muted); }
.card .pill { margin-top: auto; }
.card .tags { margin-bottom: 1.3rem; }
.card-wide { grid-column: 1 / -1; }
.card-plain .tags { margin-bottom: 0; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2rem; width: 100%; margin-top: 1.4rem; padding-top: 1.2rem; border-top: var(--line) solid var(--hair); }
.facts dt { color: var(--muted); font-size: 0.8rem; }
.facts dd { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.4; }

code { font: inherit; padding: 0.05em 0.4em; border-radius: 6px; background: var(--accent); color: var(--ink); }

.channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.9rem);
  padding: 0 0.6rem clamp(4rem, 9vw, 7rem) 0;
}
.channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0.35rem 0.35rem 0 var(--ink);
  transition: transform 0.4s var(--bouncy), box-shadow 0.4s var(--bouncy);
}
.channel:hover { transform: translate(-3px, -3px); box-shadow: 0.6rem 0.6rem 0 var(--accent); }
.channel-icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--accent); }
.channel-icon svg { width: 1.6rem; height: 1.6rem; fill: currentColor; }
.channel-name { display: block; color: var(--muted); font-size: 0.85rem; }
.channel-value { display: block; font: 800 clamp(1.15rem, 2.4vw, 1.7rem)/1.25 var(--display); overflow-wrap: anywhere; }

@media (max-width: 52rem) {
  .cards, .channels { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

/* ---------- footer: the big yellow call to action ---------- */

.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 5rem 5rem 0 0;
  background: var(--accent);
  text-align: center;
}
.cta-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: clamp(6rem, 13vw, 9rem) var(--gutter) clamp(3.5rem, 8vw, 6rem); }
.cta h2 { font-size: clamp(2.6rem, 8vw, 5.5rem); }
.cta-btn {
  margin-top: 2rem;
  padding: 0.75rem 2.4rem;
  border: var(--line) solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  color: var(--accent);
  font: 800 1.05rem/1.5 var(--display);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.35s var(--bouncy);
}
.cta-btn:hover { background: transparent; color: var(--ink); transform: scale(1.06) rotate(-2deg); }
.cta-btn:active { transform: scale(0.97); }
.cta-links { display: flex; align-items: center; gap: 1.1rem; margin-top: 2.4rem; font-family: var(--display); font-weight: 700; }
.cta-links a { position: relative; }
.cta-links a::after { content: ""; position: absolute; inset: auto 0 -3px 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.3s var(--ease); }
.cta-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.cta-links i { opacity: 0.4; font-style: normal; }
.cta-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem var(--gutter) 1.4rem;
  border-top: var(--line) solid rgb(23 23 27 / 0.18);
  font-size: 0.82rem;
}
.cta-logo .logo b { color: rgb(23 23 27 / 0.5); }

/* pale circle that follows the pointer across the footer */
.blob {
  position: absolute;
  left: 0;
  top: 0;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.5);
  translate: calc(var(--x, -50vw) - 50%) calc(var(--y, -50vh) - 50%);
  scale: var(--s, 0);
  transition: scale 0.45s var(--bouncy);
  pointer-events: none;
}

/* ---------- motion ---------- */

@view-transition { navigation: auto; }

/* .reveal is hidden only when scripting is on; the 6s animation shows it anyway
   if the script never runs, so content cannot stay invisible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; animation: show 0.01s linear 6s forwards; }
  .js .reveal.is-in { animation: reveal 0.7s var(--bouncy) calc(var(--i, 0) * 90ms) both; }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(1.75rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .blob { display: none; }
  .dude .boil { filter: none; }
}
