/* alesprokop.com */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Layout: a classic small website. Menu bar on top, a graphite band that opens every page,
   an overview home page, and three detail pages (About, Now, Personal) behind the menu.
   Graphite and paper carry both themes; yellow is the only colour. */
:root {
  color-scheme: light;
  --panel: #2B2A28;
  --panel-fg: #F3F2EE;
  --panel-muted: #B7B5AE;
  --panel-line: #4C4A46;
  --sun: #F4D35E;
  --sun-ink: #2B2300;
  --paper: #F4F4F1;
  --tile: #E9E8E3;
  --ink: #1D1D1B;
  --muted: #62615C;
  --line: #D9D7D1;
  --accent: #856400;
  --mark-bg: #FAECA8;
  --mark-fg: #473900;

  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --t-label: 0.8125rem;
  --t-small: 0.9375rem;
  --t-body: 1.0625rem;
  --t-h3: 1.4375rem;
  --t-lede: clamp(1.1875rem, 2.1vw, 1.4375rem);
  --t-h2: clamp(2rem, 4.2vw, 2.75rem);
  --t-page: clamp(2.5rem, 6.5vw, 4.25rem);
  --t-hero: clamp(3rem, 8.5vw, 5.75rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --panel: #27272A;
    --panel-fg: #F1F0EC;
    --panel-muted: #ADABA5;
    --panel-line: #454548;
    --sun: #F4D35E;
    --sun-ink: #2B2300;
    --paper: #121213;
    --tile: #1B1B1D;
    --ink: #E9E8E4;
    --muted: #9D9B95;
    --line: #2C2C2F;
    --accent: #F4D35E;
    --mark-bg: #3E340C;
    --mark-fg: #F8E7A0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --panel: #27272A;
  --panel-fg: #F1F0EC;
  --panel-muted: #ADABA5;
  --panel-line: #454548;
  --sun: #F4D35E;
  --sun-ink: #2B2300;
  --paper: #121213;
  --tile: #1B1B1D;
  --ink: #E9E8E4;
  --muted: #9D9B95;
  --line: #2C2C2F;
  --accent: #F4D35E;
  --mark-bg: #3E340C;
  --mark-fg: #F8E7A0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* Everything is sized in rem, so the whole site grows with the screen: 16px up to a laptop, 22px on a large monitor. */
html { font-size: clamp(100%, 60% + 0.5vw, 137.5%); }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.on-band a:focus-visible, .on-band button:focus-visible { outline-color: var(--sun); }
h1:focus { outline: none; }

/* one gutter for every band */
.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 5vw, 3rem); }

mark.ph {
  background: var(--mark-bg);
  color: var(--mark-fg);
  padding: 0.05em 0.25em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.on-band mark.ph { background: color-mix(in srgb, var(--sun) 22%, transparent); color: var(--sun); }

/* ---------- draft note + menu bar ---------- */
.draft { background: var(--tile); font-size: var(--t-small); color: var(--muted); }
.draft .wrap { padding-block: 0.6rem; }

.site-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem 1.5rem;
  padding-block: 0.9rem;
}
.brand { font-family: var(--display); font-size: 1.4375rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; font-size: var(--t-small); font-weight: 500; }
.menu a { text-decoration: none; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--line); }
.menu a[aria-current="page"] { border-bottom-color: var(--sun); font-weight: 700; }
.toggle {
  font: 600 var(--t-label)/1 var(--body);
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.6em 0.95em;
  cursor: pointer;
}
.toggle:hover { border-color: var(--ink); }

/* ---------- bands that open a page ---------- */
.hero, .page-head { background: var(--panel); color: var(--panel-fg); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: center;
  gap: 2.5rem 4rem;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.hello { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.hero h1 {
  font-family: var(--display);
  font-size: var(--t-hero);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
}
/* The háček is the one sunlit mark: a yellow "š" with a light "s" laid exactly over it. */
.hacek { display: inline-block; position: relative; color: var(--sun); }
.hacek::before { content: "s"; position: absolute; top: 0; left: 0; color: var(--panel-fg); }
.say { font-family: var(--display); font-style: italic; color: var(--panel-muted); }
.lede { font-size: var(--t-lede); line-height: 1.45; max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; padding-top: 0.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font: 600 var(--t-small)/1 var(--body);
  padding: 0.95em 1.25em;
  border-radius: 10px;
  border: 1.5px solid var(--panel-line);
  background: transparent;
  color: var(--panel-fg);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--sun); color: var(--sun); }
.btn.sun { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
.btn.sun:hover { background: var(--panel-fg); border-color: var(--panel-fg); color: var(--sun-ink); }

.slot {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  max-width: 100%;
  border: 2px dashed var(--line);
  border-radius: 22px;
  font-size: var(--t-small);
}
.photo {
  justify-self: end;
  display: block;
  width: min(100%, 20rem);
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  background: var(--panel-line);
}

/* Personal page: hobbies beside one photo */
.hobbies { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 1.5rem 2.5rem; align-items: start; }
.tiles.stack { grid-template-columns: minmax(0, 1fr); }
.shot { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.shot img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 18px; background: var(--tile); }
.shot figcaption { font-size: var(--t-small); color: var(--muted); }

.page-head .wrap { display: flex; flex-direction: column; gap: 0.9rem; padding-block: clamp(2.25rem, 6vw, 4rem); }
.page-head h1 {
  font-family: var(--display);
  font-size: var(--t-page);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-head .sub { font-size: var(--t-lede); line-height: 1.45; color: var(--panel-muted); max-width: 46ch; }
.back { align-self: flex-start; font-size: var(--t-small); color: var(--panel-muted); text-decoration: none; }
.back:hover { color: var(--sun); }

/* ---------- sections ---------- */
.sec > .wrap { display: flex; flex-direction: column; gap: 2rem; padding-block: clamp(3rem, 7vw, 5rem); }
.sec.tint { background: var(--tile); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem; }
.sec h2 {
  font-family: var(--display);
  font-size: var(--t-h2);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.sec h3 { font-family: var(--display); font-size: var(--t-h3); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.intro { color: var(--muted); max-width: 60ch; }

.prose { display: flex; flex-direction: column; gap: 1.1rem; max-width: 62ch; }
.prose .first { font-size: var(--t-lede); line-height: 1.45; }
.more { align-self: flex-start; font-weight: 600; }
.more:hover, .prose a:hover, .links a:hover { color: var(--accent); }

.stamp { display: inline-flex; align-items: center; gap: 0.55em; font-size: var(--t-small); color: var(--muted); }
.stamp::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 30%, transparent); }
.on-band .stamp { color: var(--panel-muted); }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.cols > li { min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.1rem; border-top: 2px solid var(--sun); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles > li { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; padding: 1.35rem; background: var(--tile); border-radius: 16px; }
.tint .tiles > li { background: var(--paper); }
.picks { display: flex; flex-direction: column; gap: 0.4rem; }

/* About page: story beside the timeline */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem 4.5rem; }
.split > div { min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.timeline { border-left: 2px solid var(--line); padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1.75rem; }
.timeline > li { position: relative; display: flex; flex-direction: column; gap: 0.3rem; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 7px);
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--muted);
}
.timeline > li.current::before { background: var(--sun); border-color: var(--sun); }
.timeline h3 { font-family: var(--body); font-size: var(--t-body); font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.timeline .org { font-weight: 400; color: var(--muted); }
.timeline .when { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-weight: 600; }

/* Now page: three longer notes */
.notes { display: flex; flex-direction: column; }
.notes > li { display: grid; grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr); gap: 0.75rem 3rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.notes > li:first-child { border-top: 0; padding-top: 0; }
.notes > li:last-child { padding-bottom: 0; }

/* Personal page: photo strip */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.strip .slot { aspect-ratio: 4 / 3; }

/* ---------- contact band + footer ---------- */
.contact { background: var(--panel); color: var(--panel-fg); scroll-margin-top: 4.5rem; }
.contact > .wrap { display: flex; flex-direction: column; gap: 1.5rem; padding-block: clamp(3rem, 7vw, 5rem); }
.contact h2 { font-family: var(--display); font-size: var(--t-h2); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.contact p { color: var(--panel-muted); max-width: 52ch; }
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.email {
  font-family: var(--display);
  font-size: clamp(1.625rem, 5.4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-decoration-color: var(--sun);
  overflow-wrap: anywhere;
}
.email:hover { color: var(--sun); }

.foot { background: var(--panel); color: var(--panel-muted); font-size: var(--t-small); }
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--panel-line);
}

/* ---------- widths ---------- */
@media (min-width: 48rem) {
  .site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
}
@media (max-width: 64rem) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 47.99rem) {
  .hero .wrap, .split, .cols, .tiles.three, .notes > li, .hobbies { grid-template-columns: minmax(0, 1fr); }
  .photo { justify-self: start; width: min(100%, 16rem); }
  .contact { scroll-margin-top: 1rem; }
}
@media (max-width: 30rem) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .strip { gap: 0.5rem; }
  .strip .slot { aspect-ratio: 1; border-radius: 14px; padding: 0.25rem; }
}
@media (prefers-reduced-motion: no-preference) {
  a, .btn, .toggle { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
}
