/* Reset */
html, body, div, span, h1, h2, h3, p, a, strong, em, ul, li, section, footer, time, button, figure, figcaption, img {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
section, footer { display: block; }
ul { list-style: none; }
*, *:before, *:after { box-sizing: border-box; }

:root {
  --viewport-height: 100vh;
  --ink: #FFFFFF;
  --ink-dim: rgba(255,255,255,0.588);
  --ink-faint: rgba(255,255,255,0.32);
  --settle: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html { font-size: 15pt; }

body {
  -webkit-text-size-adjust: none;
  touch-action: pan-y pinch-zoom;
  line-height: 1.0;
  min-height: var(--viewport-height);
  min-width: 320px;
  overflow-x: hidden;
  word-wrap: break-word;
  background-color: #000000;
}

::selection {
  background: rgba(255,255,255,0.85);
  color: #000000;
}

/* Night canvas: the cursor is a small light over a field of dots */
#night {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 2.5s ease 0.4s;
}
body:not(.is-loading) #night { opacity: 1; }

strong { color: inherit; font-weight: bolder; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 0.25s ease, opacity 0.25s ease;
}
a:hover { text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 1px dotted var(--ink);
  outline-offset: 3px;
}

/* Layout */
#wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--viewport-height);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

#main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  max-width: 100%;
  position: relative;
  text-align: left;
  z-index: 1;
  transition: opacity 1s ease 0s, transform 1s ease 0s;
}

#main > .inner {
  --padding-horizontal: 3.375rem;
  --padding-vertical: 0rem;
  --spacing: 0.75rem;
  --width: 36rem;
  max-width: 100%;
  position: relative;
  width: var(--width);
  z-index: 1;
  padding: var(--padding-vertical) var(--padding-horizontal);
}

#main > .inner > * > * {
  margin-top: var(--spacing);
  margin-bottom: var(--spacing);
}
#main > .inner > * > :first-child { margin-top: 0 !important; }
#main > .inner > * > :last-child { margin-bottom: 0 !important; }

body.is-loading #main {
  opacity: 0;
  transform: scale(0.94375);
}

/* Dividers */
hr {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  min-height: 1rem;
  padding: 0;
  position: relative;
  width: 100%;
}
hr:before {
  content: '';
  width: 100%;
  height: 1px;
  border-top: dotted 1px var(--ink);
  transform-origin: left center;
}
#divider08:before {
  border-top: 0;
  background-color: var(--ink);
}

/* Text */
h2, p { position: relative; }

h2 {
  color: var(--ink);
  font-family: 'Andada Pro', serif;
  font-size: 1.375em;
  line-height: 1.5;
  font-weight: 400;
}

p, .list {
  color: var(--ink);
  font-family: 'Andada Pro', serif;
  font-size: 1em;
  line-height: 1.5;
  font-weight: 400;
}

#text06, #text07, #text08, #text09 {
  font-family: 'Assistant', sans-serif;
}

/* Plain colors instead of Carrd's background-clip text, which can't fade in smoothly */
#text05 { color: var(--ink-dim); }
#text05 strong { color: rgba(255,255,255,0.79); }

/* Handles next to social links */
.handle {
  color: var(--ink-faint);
  font-size: 0.9em;
  margin-left: 0.35em;
}

/* Header + tabs: one pair of brackets marks where you are and follows your pointer */
#header { margin-bottom: var(--spacing); }

.tabs {
  --tab-pad: 0.55em;
  display: inline-flex;
  margin-left: calc(var(--tab-pad) * -1);
  position: relative;
  font-family: 'Assistant', sans-serif;
  font-size: 1em;
  line-height: 1.5;
}
.tabs a {
  position: relative;
  z-index: 1;
  padding: 0 var(--tab-pad);
  color: rgba(255,255,255,0.42);
  text-decoration: none;
  transition: color 0.45s ease;
}
.tabs a:hover,
.tabs a:focus-visible,
.tabs a[aria-current] {
  color: var(--ink);
}
.tabs a:focus-visible { outline-offset: 0; }

.tabs-frame {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  pointer-events: none;
  transition: transform 0.6s var(--settle), width 0.6s var(--settle), opacity 0.35s ease;
}
.tabs-frame:before,
.tabs-frame:after {
  position: absolute;
  top: 0;
  color: var(--ink);
}
.tabs-frame:before { content: '['; left: 0; }
.tabs-frame:after { content: ']'; right: 0; }
.tabs-frame.is-previewing { opacity: 0.5; }
.tabs:not(.is-ready) .tabs-frame { transition: none; }

/* Email copy */
.copy {
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  font-family: 'Assistant', sans-serif;
  font-size: 0.8em;
  margin-left: 0.5em;
  padding: 0 0.15em;
  transition: color 0.25s ease;
}
.copy:hover { color: var(--ink); }

/* A button that reads like a link (discord: click copies the username) */
.copy.copy-link {
  color: inherit;
  font-size: 1em;
  margin-left: 0;
  padding: 0;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.copy.copy-link:hover { text-decoration: none; }
.copy-status {
  color: var(--ink-faint);
  font-size: 0.8em;
  margin-left: 0.35em;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.copy-status.is-shown { opacity: 1; }

/* Lists */
.list { display: block; }
.list ul {
  display: inline-block;
  max-width: 100%;
  text-align: left;
  vertical-align: middle;
}
.list ul li {
  display: flex;
  position: relative;
  margin-top: 0.5rem;
  transition: opacity 0.5s ease;
}
.list ul li:first-child { margin-top: 0 !important; }
.list ul li:before {
  content: '';
  display: block;
  flex-grow: 0;
  flex-shrink: 0;
  order: 1;
  position: relative;
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2040%2040%22%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%2210%22%20fill%3D%22%23FFFFFF%22%20%2F%3E%3C%2Fsvg%3E');
  background-position: left 60%;
  background-repeat: no-repeat;
  background-size: contain;
  height: 1.5rem;
  line-height: 1.5rem;
  min-width: 0.5625rem;
}
.list ul li:after {
  content: '';
  display: block;
  flex-grow: 0;
  flex-shrink: 0;
  order: 2;
  pointer-events: none;
  width: 0.625rem;
}
.list ul li p {
  flex-grow: 1;
  flex-shrink: 1;
  order: 3;
}
#list01 ul { width: auto; }

/* Portfolio: each project is a cover and a few words */
.works {
  display: flex;
  flex-direction: column;
}
.work {
  position: relative;
  padding: 0.175rem 0;
  transition: opacity 0.5s ease;
}

/* Timeline: gray years hang in the margin left of the projects, threaded by a faint line with a dot per entry.
   The rows themselves keep their position; the timeline sits outside the column. */
.work-year {
  --rail: 1.1rem;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  width: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: calc(var(--rail) + 0.6rem);
  color: var(--ink-faint);
  font-family: 'Assistant', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.work-year:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: var(--rail);
  width: 1px;
  background: rgba(255,255,255,0.14);
}
.work:first-child .work-year:before { top: 50%; }
.work:last-child .work-year:before { bottom: 50%; }
.work-year:after {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(var(--rail) - 2px);
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

/* Too narrow for a margin timeline: the year sits as a small label above its project instead */
@media (max-width: 736px) {
  .work-year {
    position: static;
    width: auto;
    display: block;
    padding: 0.35rem 0 0;
  }
  .work-year:before,
  .work-year:after { display: none; }
}
.work.is-gone { opacity: 0.5; }
@media (hover: hover) {
  .works:hover .work { opacity: 0.3; }
  .works:hover .work:hover { opacity: 1; }
}

/* The whole row is one link; on hover a faint frame gathers cover and text into a box */
.work-link {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0 -0.6rem;
  padding: 0.6rem;
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.6s ease, background-color 0.6s ease;
}
.work-link:hover,
.work-link:focus-visible {
  border-color: rgba(255,255,255,0.2);
  background-color: rgba(255,255,255,0.035);
}
.work-link:focus-visible {
  outline: none;
  border-color: rgba(255,255,255,0.55);
}

.work-cover {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 8.5rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255,255,255,0.14);
  transition: border-color 0.6s ease;
}
.work-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.62);
  transform: scale(1.04);
  transition: filter 0.9s ease, transform 1.4s var(--settle);
}
.work-link:hover .work-cover,
.work-link:focus-visible .work-cover { border-color: rgba(255,255,255,0.45); }
.work-link:hover .work-cover img,
.work-link:focus-visible .work-cover img {
  filter: grayscale(0) brightness(1);
  transform: scale(1);
}

/* No image yet: a dotted frame holding the project's first letter */
.work-cover.is-empty { border-style: dotted; }
.work-cover.is-empty img { display: none; }
.work-cover.is-empty:after {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.28);
  font-family: 'Andada Pro', serif;
  font-size: 1.6em;
  font-style: italic;
}

.work-text { min-width: 0; }
.work-name {
  line-height: 1.35;
}
.work-status {
  color: var(--ink-faint);
  font-family: 'Assistant', sans-serif;
  font-size: 0.8em;
  margin-left: 0.6em;
}
.work-desc {
  color: var(--ink-dim);
  line-height: 1.4;
  margin-top: 0.15rem;
}

@media (max-width: 480px) {
  .work-link { gap: 0.9rem; }
  .work-cover { width: 6.5rem; }}

/* Atmosphere: the edges of the room fall off into dark, with a little film grain */
body:before,
body:after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
body:before {
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 40%, rgba(0,0,0,0.75) 100%);
}
body:after {
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Title: roman "peet", italic "foxx", the fox mark drawn in one line, and the time back home */
#title {
  display: flex;
  align-items: baseline;
}
#title em { font-style: italic; }
.title-word { white-space: nowrap; }
.title-word.is-decoding .ch {
  display: inline-block;
  text-align: center;
}
.title-word .ch.is-noise { color: var(--ink-faint); }

.mark {
  align-self: center;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.4em;
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark-eyes {
  stroke: var(--ink-dim);
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 7s ease-in-out 4s infinite;
}
.mark path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-entering .mark-head { animation: ink 2.2s var(--settle) 0.25s both; }
.is-entering .mark-eyes { animation: ink 1.4s var(--settle) 1.2s both; }

.clock {
  margin-left: auto;
  color: var(--ink-faint);
  font-family: 'Assistant', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 0.6em;
  vertical-align: 0.2em;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.clock.is-day .clock-dot { background: currentColor; }

/* Language switch: [ EN ] / [ CZ ], the letters scramble into the other language */
.lang {
  background: none;
  color: var(--ink-dim);
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.08em;
  padding: 0.2em 0;
  transition: color 0.3s ease;
}
.lang:before { content: '[\00a0'; color: var(--ink-faint); transition: color 0.3s ease; }
.lang:after  { content: '\00a0]'; color: var(--ink-faint); transition: color 0.3s ease; }
.lang:hover,
.lang:focus-visible { color: var(--ink); }
.lang:hover:before,
.lang:hover:after { color: var(--ink-dim); }
.lang-code {
  display: inline-block;
  min-width: 1.45em;
  text-align: center;
}
.is-noise-text { color: var(--ink-faint); }
.clock-colon { animation: tick 2s steps(1) infinite; }

/* A glint travels the top line now and then */
#divider01 { overflow: hidden; }
#divider01:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 22%;
  height: 3px;
  margin-top: -1.5px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.9), transparent 70%);
  filter: blur(1px);
  opacity: 0;
  animation: glint 11s ease-in-out 3s infinite;
}

/* About list: the line you're reading steps forward, the rest recede */
.list ul li p { transition: transform 0.5s var(--settle), color 0.5s ease; }
.list ul li:before { transition: opacity 0.5s ease, transform 0.5s var(--settle); }
@media (hover: hover) {
  .list ul:hover li { opacity: 0.4; }
  .list ul li:hover { opacity: 1; }
  .list ul li:hover p { transform: translateX(0.3em); }
  .list ul li:hover:before { transform: scale(1.35); }
}

/* Project names hint where they lead */
.work-name strong:after {
  content: '\2197';
  display: inline-block;
  margin-left: 0.25em;
  font-family: 'Assistant', sans-serif;
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0;
  transform: translate(-0.25em, 0.25em);
  transition: opacity 0.4s ease, transform 0.5s var(--settle);
}
.work-link:hover .work-name strong:after,
.work-link:focus-visible .work-name strong:after {
  opacity: 0.7;
  transform: none;
}
/* A project without a link: same quiet hover, but no arrow and no pointer */
.work-link.is-static { cursor: default; }
.work-link.is-static:hover .work-name strong:after { opacity: 0; }

/* Timeline wakes up with the project you're on */
.work-year { transition: color 0.5s ease; }
.work-year:after { transition: background-color 0.5s ease, transform 0.5s var(--settle), box-shadow 0.5s ease; }
.work:hover .work-year,
.work:focus-within .work-year { color: var(--ink); }
.work:hover .work-year:after,
.work:focus-within .work-year:after {
  background: var(--ink);
  transform: scale(1.5);
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* Keyboard hint, only where there is a keyboard */
.hint {
  position: fixed;
  right: 1.5rem;
  bottom: 1.25rem;
  z-index: 3;
  display: none;
  color: var(--ink-faint);
  font-family: 'Assistant', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hint kbd {
  display: inline-block;
  min-width: 1.5em;
  margin-right: 0.3em;
  padding: 0 0.3em;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  font: inherit;
  text-align: center;
}
.hint-touch { display: none; }
/* Anything that isn't a mouse-and-keyboard setup gets the swipe version */
@media not all and (hover: hover) and (pointer: fine) {
  .hint {
    display: block;
    right: 0;
    left: 0;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.95rem;
    text-align: center;
  }
  .hint-keys { display: none; }
  .hint-touch {
    display: inline-flex;
    align-items: center;
  }
  .hint-touch kbd { margin-right: 0; animation: key-left 2.6s ease-in-out infinite; }
  .hint-touch kbd + .swipe-track + kbd { margin-right: 0.6em; animation-name: key-right; }
  body:not(.is-loading) .hint { opacity: 1; transition-delay: 1.5s; }
  body.has-wandered .hint { opacity: 0; transition-delay: 0s; }
}
/* A thumb-dot glides between the two keys, and each key lights as it arrives */
.swipe-track {
  position: relative;
  display: inline-block;
  width: 2.4em;
  height: 1px;
  margin: 0 0.35em;
  background: rgba(255,255,255,0.14);
}
.swipe-track i {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 6px rgba(255,255,255,0.6);
  animation: glide 2.6s ease-in-out infinite;
}
@keyframes glide {
  0%, 100% { left: 0; }
  50%      { left: 100%; }
}
@keyframes key-left {
  0%, 100% { color: var(--ink); border-color: rgba(255,255,255,0.5); }
  20%, 80% { color: inherit; border-color: rgba(255,255,255,0.18); }
}
@keyframes key-right {
  0%, 30%, 70%, 100% { color: inherit; border-color: rgba(255,255,255,0.18); }
  50%                { color: var(--ink); border-color: rgba(255,255,255,0.5); }
}
@media (hover: hover) and (pointer: fine) {
  .hint { display: block; }
  body:not(.is-loading) .hint { opacity: 1; transition-delay: 3.5s; }
  body.has-wandered .hint { opacity: 0; transition-delay: 0s; }
}

@keyframes ink {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}
@keyframes blink {
  0%, 94%, 100% { transform: none; }
  96%           { transform: scaleY(0.1); }
}
@keyframes tick {
  0%  { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes glint {
  0%   { transform: translateX(-100%); opacity: 0; }
  4%   { opacity: 1; }
  18%  { transform: translateX(460%); opacity: 0; }
  100% { transform: translateX(460%); opacity: 0; }
}

/* Entry: things come into focus, like eyes adjusting to the dark */
.is-entering > * {
  animation: focus-in 1.1s var(--settle) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
.is-entering > h2 {
  animation: flip-in 1.8s var(--settle) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
.is-entering > hr:before {
  animation: draw 1.4s var(--settle) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
.is-entering > hr { animation: none; }

section.is-leaving > * {
  opacity: 0;
  filter: blur(5px);
  transition: opacity 0.32s ease, filter 0.32s ease, transform 0.32s var(--settle);
}
/* Directional changes (swipe, arrow keys): lines leave in a slight cascade toward where you're going */
section.is-leaving.to-next > *,
section.is-leaving.to-prev > * { transition-delay: calc(var(--i, 0) * 18ms); }
section.is-leaving.to-next > * { transform: translateX(-1.5rem); }
section.is-leaving.to-prev > * { transform: translateX(1.5rem); }
.is-entering.from-next > *,
.is-entering.from-prev > * {
  animation: slide-in 0.9s var(--settle) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.is-entering.from-next > * { --from: 2.5rem; }
.is-entering.from-prev > * { --from: -2.5rem; }
.is-entering.from-next > hr,
.is-entering.from-prev > hr { animation: none; }

@keyframes focus-in {
  from { opacity: 0; filter: blur(6px); }
  to   { opacity: 1; filter: blur(0); }
}
@keyframes flip-in {
  from { opacity: 0; filter: blur(4px); transform: perspective(1000px) rotateX(16.875deg); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes slide-in {
  from { opacity: 0; filter: blur(6px); transform: translateX(var(--from, 0)); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes draw {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 1680px) {
  html { font-size: 11pt; }
}

@media (max-width: 980px) {
  html { font-size: 9pt; }
}

@media (max-width: 736px) {
  #main > .inner { --padding-horizontal: 2rem; }
  hr:before { width: 100rem; }
}

@media (max-width: 480px) {
  #main > .inner { --spacing: 0.65625rem; }
}

@media (max-width: 360px) {
  #main > .inner {
    --padding-horizontal: 1.5rem;
    --spacing: 0.5625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main, #night, .tabs-frame, section.is-leaving > *, .work-cover img { transition: none !important; }
  .mark path, #divider01:after, .clock-colon, .hint-touch kbd, .swipe-track i { animation: none !important; }
  .is-entering > *,
  .is-entering > h2,
  .is-entering > hr:before { animation: none !important; }
}
