/* Liv Tymes: children's book illustrator
   Light, pastel look. Name lettering: Grandstander ("Bouncy"). Text: Karla. */

:root {
  --ink: #2E3350;
  --muted: #6B7089;
  --line: #ECEAF2;
  --name: #1B7F88;
  --coral: #C0406E;
  --butter: #FFE08A;
  --butter-hover: #FFD45C;
  --sky: #F1F8F9;
  --cream: #FFFAEE;
  --blush: #FDF2F5;
  --mint: #F1F8EF;
  --frame: #EFE6CC;
  --dot1: #FFC83D;
  --dot2: #F2608E;
  --dot3: #7BC96F;
  --dot4: #4FC3D9;
  --gutter: 18px;
  --header-h: 104px;
  --namefont: "Grandstander", "Comic Sans MS", "Chalkboard SE", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--name); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; background: #FFFFFF; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

.inner { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.name { font-family: var(--namefont); font-weight: 700; color: var(--name); line-height: 1; letter-spacing: 0.01em; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 16px; padding-block: 12px 10px; }
.bar .name { font-size: 28px; text-decoration: none; }
.bar .name:hover { opacity: 0.85; }
.btn { display: inline-block; background: var(--butter); color: var(--ink); font-weight: 700; text-decoration: none; padding: 12px 22px; border-radius: 999px; transition: background 0.2s; }
.btn:hover { background: var(--butter-hover); }
.btn.small { margin-left: auto; font-size: 14px; padding: 7px 14px; }
/* Language switch: EN | CZ */
.lang { margin-left: auto; display: flex; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; }
.lang + .btn.small { margin-left: 0; }
.lang a { padding: 6px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--name); }
.lang a[aria-current] { background: var(--sky); color: var(--name); }
.bar .name, .btn.small { white-space: nowrap; }
/* Narrow phones: squeeze the top bar so it stays on one line */
@media (max-width: 440px) {
  .bar { gap: 10px; }
  .bar .name { font-size: 24px; }
  .lang a { padding: 5px 8px; }
  .btn.small { font-size: 13px; padding: 7px 11px; }
}
/* Very narrow: "Work with me" is still in the category row as "Contact" */
@media (max-width: 340px) {
  .btn.small { display: none; }
}
.cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #FFFFFF; }
.cats a:hover { color: var(--ink); border-color: #D5D2E0; }
.cats i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* ---------- Welcome ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 30px 40px; }
.hero-text { display: grid; gap: 14px; align-content: center; }
.dots { display: flex; gap: 7px; }
.dots span { width: 11px; height: 11px; border-radius: 50%; }
.hero h1 { font-size: clamp(52px, 13vw, 92px); }
.hero .lead { font-size: clamp(20px, 2.4vw, 26px); font-weight: 500; line-height: 1.3; max-width: 26ch; }
.hero .sub { color: var(--muted); max-width: 44ch; }
.hero .btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--name); background: transparent; }

/* ---------- Sections ---------- */
.sec { padding-block: 44px; }
.sec > .inner { display: grid; gap: 26px; }
.sky { background: var(--sky); }
.cream { background: var(--cream); }
.blush { background: var(--blush); }
.mint { background: var(--mint); }
.head { display: grid; gap: 8px; align-content: start; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); }
.head h2 { font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.head p:not(.label) { max-width: 58ch; color: var(--muted); }

/* Pictures that open the big viewer */
.zoomable { cursor: zoom-in; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: #FFFFFF;  overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.zoom:hover img { transform: scale(1.03); }

.work { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-flow: dense; gap: 10px; }
.work .zoom { aspect-ratio: 1; }
.work .big { grid-column: span 2; grid-row: span 2; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grid .zoom { aspect-ratio: 1; }
.spreads { display: grid; gap: 12px; }
.spreads .zoom { aspect-ratio: 2 / 1; border-radius: 8px; }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---------- Books ---------- */
.shelf { display: grid; gap: 36px; }
.book { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.book + .book { padding-top: 36px; border-top: 1px dashed #E3D9BD; }
.book-text { display: grid; gap: 4px; align-content: start; }
.book h3 { font-size: 23px; font-weight: 600; line-height: 1.2; }
.meta { color: var(--muted); font-size: 15px; }
.link { display: inline-block; margin-top: 6px; color: var(--coral); font-weight: 700; font-size: 15px; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Slideshows */
.show { display: grid; gap: 10px; justify-items: center; min-width: 0; width: 100%; }
.slides { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); width: 100%; }
.slides img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
/* Welcome pictures take turns by themselves */
.show.auto .slides { max-width: 480px; aspect-ratio: 1; }
.show.auto .slides img { opacity: 0; transform: scale(0.97); transition: opacity 1.2s ease, transform 5s ease-out; }
.show.auto .slides img.on { opacity: 1; transform: scale(1); }
/* Book pictures stay still; visitors slide them */
.show.manual .slides { display: flex; aspect-ratio: 16 / 10; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; background: #FFFFFF; border-radius: 12px; box-shadow: 0 0 0 1px var(--frame); }
.show.manual .slides::-webkit-scrollbar { display: none; }
.show.manual .slides img { flex: 0 0 100%; height: 100%; padding: 12px; scroll-snap-align: start; scroll-snap-stop: always; }
.slide-bar { display: flex; align-items: center; gap: 6px; }
.slide-bar button { padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--ink); font: inherit; }
.slide-dots { display: flex; flex-wrap: wrap; justify-content: center; }
.slide-dots button { width: 22px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.slide-dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #D9D6E3; transition: background 0.3s, transform 0.3s; }
.slide-dots button.on::before { background: var(--name); transform: scale(1.25); }
.slide-bar .arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1; background: #FFFFFF; box-shadow: 0 0 0 1px #E6DDC2; }
.slide-bar .arrow:hover { box-shadow: 0 0 0 1.5px var(--name); color: var(--name); }
.slide-bar .arrow:disabled { opacity: 0.35; cursor: default; box-shadow: 0 0 0 1px #E6DDC2; color: var(--ink); }

/* ---------- About & contact ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.about-text { display: grid; gap: 12px; align-content: center; }
.about-text p:not(.label) { max-width: 58ch; }
.about .portrait { width: 100%; max-width: 360px; margin-inline: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; box-shadow: 0 0 0 8px #FFFFFF, 0 0 0 9px var(--line), 0 14px 30px rgb(46 51 80 / 0.12); }
.about .doodle { width: 100%; max-width: 300px; margin-top: 8px; }

.contact { text-align: center; padding-block: 52px; }
.contact > .inner { justify-items: center; gap: 16px; }
.contact .name { font-size: 46px; }
.contact h2 { font-size: 26px; font-weight: 600; }
.contact p { color: var(--muted); max-width: 48ch; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-weight: 600; }
.social a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--butter); }
.social a:hover { border-color: var(--name); }
.foot { font-size: 14px; color: var(--muted); text-align: center; padding-block: 18px 28px; }

/* ---------- Big picture viewer ---------- */
[hidden] { display: none !important; }
body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 50; background: #FFFFFF; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer-track { display: flex; min-height: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; min-width: 0; padding: 0 16px; scroll-snap-align: center; scroll-snap-stop: always; }
.viewer-top { display: flex; justify-content: flex-end; padding: 12px; }
.viewer-slide img { max-width: min(100%, 900px); max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.viewer-nav[hidden] { display: none; }
.viewer-nav { display: flex; justify-content: center; gap: 12px; padding: 12px 12px 20px; }
.viewer button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #FFFFFF; box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgb(46 51 80 / 0.1); font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }
.viewer button:hover { color: var(--name); }

/* ---------- Bigger screens ---------- */
@media (min-width: 760px) {
  :root { --gutter: 40px; --header-h: 112px; }
  .bar .name { font-size: 32px; }
  .cats { gap: 8px; }
  .hero { grid-template-columns: 1fr 1.05fr; gap: 40px; padding-block: 44px 56px; align-items: center; }
  .sec { padding-block: 72px; }
  .sec > .inner { gap: 34px; }
  .head h2 { font-size: 38px; }
  .work { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .grid.four { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .grid.three { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .spreads { grid-template-columns: 1fr 1fr; gap: 16px; }
  .book { grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
  .chars { grid-template-columns: 1fr 1.4fr; align-items: center; column-gap: 48px; }
  .chars .grid { gap: 16px; }
  .about { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; column-gap: 64px; }
  .about .portrait { max-width: 400px; }
  .contact .name { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zoom img, .show.auto .slides img, .slide-dots button::before { transition: none; transform: none; }
  .zoom:hover img { transform: none; }
}
