/* pehaa.com — plain CSS, no build step.
   Sections: 1 fonts · 2 settings · 3 base · 4 frame + dotted lines · 5 tabs · 6 "PeHaa" letters
             7 layout · 8 text + links · 9 bio · 10 projects + find me · 11 footer
             12 scroll reveal · 13 page-to-page animation */

/* 1 fonts ------------------------------------------------------------ */
/* Headings: Dharma Gothic E comes from the Adobe Fonts kit linked in each HTML file. */
/* Body text: JetBrains Mono, hosted with the site. (Still open: the final monospace font.) */
@font-face { font-family:"JetBrains Mono"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url(/fonts/jetbrains-mono-latin-ext.woff2) format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"JetBrains Mono"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url(/fonts/jetbrains-mono-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* 2 settings --------------------------------------------------------- */
/* These two are declared as real colours, so the browser can blend them smoothly (used by the "changing colours" dot). */
@property --accent      { syntax:"<color>"; inherits:true; initial-value:#ff4b24; }
@property --accent-deep { syntax:"<color>"; inherits:true; initial-value:#c92a06; }
:root {
  /* ---- every colour of the site is defined here, once ---- */
  --purple-brown:#231F20; --egg-shell:#e8e4d2;

  /* accent palette: the colours a visitor can pick with the dots in the top right corner (js/accent.js).
     Each has a deeper twin for small details. */
  --accent-vermilion:#ff4b24; --accent-vermilion-deep:#c92a06;
  --accent-saffron:#ffb81c;   --accent-saffron-deep:#c98600;
  --accent-lime:#acda07;      --accent-lime-deep:#7a9c00;
  --accent-mint:#19e6a0;      --accent-mint-deep:#0aa870;
  --accent-cobalt:#2f5bff;    --accent-cobalt-deep:#1436c9;
  --accent-violet:#7a3cff;    --accent-violet-deep:#5216d6;

  /* the accent in use */
  --accent:var(--accent-vermilion); --accent-deep:var(--accent-vermilion-deep);
  --accent-soft:color-mix(in srgb, var(--accent) 80%, transparent);   /* letters on the Projects page */

  /* fonts and body text */
  --font-heading:dharma-gothic-e, Impact, sans-serif; --heading-weight:900;   /* headings and the big letters */
  --font-body:"JetBrains Mono", ui-monospace, Menlo, monospace; --body-size:.9375rem; --body-leading:1.75; --underline-at:1.05rem;
  --on-accent:var(--egg-shell);             /* text on top of the accent colour */

  /* the pattern inside the big letters: four layers (img/contours-1.svg … 4.svg), one colour each */
  --pattern-ink:#000000;                                              /* fine map lines */
  --pattern-tint:color-mix(in srgb, var(--accent) 75%, white);    /* wider map lines */
  --pattern-light:var(--egg-shell);                                   /* dots and plus signs; changes on Find me, see below */
  --pattern-white:#ffffff;                                            /* layer 4 (the dot fields); changes on Find me, see below */
  --pattern-1:var(--pattern-ink); --pattern-2:var(--pattern-tint); --pattern-3:var(--pattern-light); --pattern-4:var(--pattern-white);
  /* how far the pattern moves between pages (1 = same distance as the old site) */
  --travel:3;
  /* letter colour, one per page */
  --c-bio:var(--accent); --c-projects:var(--accent-soft); --c-find-me:var(--egg-shell);

  /* page-to-page animation (approved 2026-12-04) */
  --wipe-time:.7s;  --wipe-ease:cubic-bezier(.2,0,0,1);
  --slide-time:3.1s; /* how long the pattern takes to slide */
  /* four ways for the pattern to move; --slide-ease picks one */
  --ease-soft:cubic-bezier(.6,0,.2,1); /* slow start, long gentle landing, no come-back */
  --ease-glide:linear(0, 0.0001, 0.001, 0.0033, 0.0078, 0.0153, 0.0264, 0.0419, 0.0625, 0.089, 0.1221, 0.1625, 0.2109, 0.2682, 0.335, 0.412, 0.5, 0.588, 0.665, 0.7318, 0.7891, 0.8375, 0.8779, 0.911, 0.9375, 0.9592, 0.9777, 0.9934, 1.0062, 1.0161, 1.0229, 1.0268, 1.028, 1.0269, 1.0239, 1.0194, 1.014, 1.0086, 1.0041, 1.0011, 1); /* slow start, long glide, ~3% past the target, soft return */
  --ease-spring:linear(0, 0.0357, 0.1233, 0.2386, 0.3643, 0.4883, 0.603, 0.704, 0.7894, 0.8589, 0.9135, 0.9547, 0.9845, 1.0049, 1.0178, 1.025, 1.028, 1.0281, 1.0263, 1.0234, 1.0199, 1.0163, 1.0129, 1.0098, 1.0072, 1.005, 1.0032, 1.0019, 1.0008, 1.0001, 0.9997, 0.9994, 1); /* quick start, ~3% past the target once, then back */
  --ease-original:ease-in; /* the old site: slow start, stops at full speed */
  --slide-ease:var(--ease-soft);
  --color-time:.8s; --color-ease:ease-out;
  --cycle-time:90s; /* one full loop of the "changing colours" dot */
}
/* ACCENTS: the visitor's choice (dots in the top right corner) replaces the accent.
   --on-accent is the text colour that sits on top of the accent: dark for the light accents. */
/* How it switches: the dots are radio buttons, and :has(…:checked) reads which one is on. No rule for vermilion: it is the value in :root.
   The [data-accent] twin is set by js/accent.js for a moment at page load, to show a saved choice before the dots exist. */
html[data-accent="saffron"], html:has(.accents [value="saffron"]:checked) { --accent:var(--accent-saffron); --accent-deep:var(--accent-saffron-deep); --on-accent:var(--purple-brown); }
html[data-accent="lime"], html:has(.accents [value="lime"]:checked) { --accent:var(--accent-lime); --accent-deep:var(--accent-lime-deep); --on-accent:var(--purple-brown); }
html[data-accent="mint"], html:has(.accents [value="mint"]:checked) { --accent:var(--accent-mint); --accent-deep:var(--accent-mint-deep); --on-accent:var(--purple-brown); }
html[data-accent="cobalt"], html:has(.accents [value="cobalt"]:checked) { --accent:var(--accent-cobalt); --accent-deep:var(--accent-cobalt-deep); }
html[data-accent="violet"], html:has(.accents [value="violet"]:checked) { --accent:var(--accent-violet); --accent-deep:var(--accent-violet-deep); }
/* The last dot, and the default for a new visitor: the accent drifts through the whole palette, slowly, in a loop.
   Order: three light-text colours, then three dark-text ones, so the text colour on top flips only twice per loop.
   steps(…): the colour is refreshed a few times per second instead of on every frame; the eye cannot tell, the browser works less. */
html[data-accent="cycle"], html:not([data-accent]):has(.accents [value="cycle"]:checked) {
  animation:accent-cycle var(--cycle-time) steps(75) infinite;
  animation-delay:calc(var(--cycle-time) * -.5); }   /* start half a loop in: at mint */
@keyframes accent-cycle {
  0%, 100% { --accent:var(--accent-vermilion); --accent-deep:var(--accent-vermilion-deep); --on-accent:var(--egg-shell); }
  16.6%    { --accent:var(--accent-saffron);   --accent-deep:var(--accent-saffron-deep);   --on-accent:var(--purple-brown); }
  33.3%    { --accent:var(--accent-lime);      --accent-deep:var(--accent-lime-deep);      --on-accent:var(--purple-brown); }
  50%      { --accent:var(--accent-mint);      --accent-deep:var(--accent-mint-deep);      --on-accent:var(--purple-brown); }
  66.6%    { --accent:var(--accent-cobalt);    --accent-deep:var(--accent-cobalt-deep);    --on-accent:var(--egg-shell); }
  83.3%    { --accent:var(--accent-violet);    --accent-deep:var(--accent-violet-deep);    --on-accent:var(--egg-shell); }
}

/* The letters are egg-shell on Find me, so the light marks of the pattern switch to the accent there. */
html.find-me { --pattern-light:var(--accent-deep); --pattern-white:var(--accent-deep); }   /* light marks would vanish on the light letters */

/* per page: --bg page colour, --fg text, --line dotted lines + frame, --c letter colour,
   --step how far along the pattern is (0, 1, 2), --x/--y where the colour wipe starts (the page's tab) */
html.bio      { --bg:var(--purple-brown); --fg:var(--egg-shell);    --line:var(--egg-shell);    --c:var(--c-bio);      --step:0; --x:0%; }
html.projects { --bg:var(--egg-shell);    --fg:var(--purple-brown); --line:var(--purple-brown); --c:var(--c-projects); --step:1; --x:33.3%; }
html.find-me  { --bg:var(--accent);   --fg:var(--on-accent);    --line:var(--on-accent);    --c:var(--c-find-me);  --step:2; --x:66.6%; }
/* where the visitor came from (set by the small script in each page's <head>) */
html[data-from="bio"]      { --from-step:0; --from-c:var(--c-bio); }
html[data-from="projects"] { --from-step:1; --from-c:var(--c-projects); }
html[data-from="find-me"]  { --from-step:2; --from-c:var(--c-find-me); }
:root { --y:0px; --tab:33.4%; }
@media (min-width:64em) {
  :root { --y:16px; --tab:6rem; }
  html.bio { --x:130px; } html.projects { --x:203px; } html.find-me { --x:329px; }
}

/* 3 base ------------------------------------------------------------- */
html { font-size:100%; -webkit-text-size-adjust:100%; -moz-osx-font-smoothing:grayscale; -webkit-font-smoothing:antialiased;
  box-sizing:border-box; background:var(--bg-under, var(--bg)); }
*, *:before, *:after { box-sizing:inherit; margin:0; }
*:before, *:after { pointer-events:none; }
body { font-family:var(--font-body); font-size:var(--body-size); line-height:var(--body-leading);
  color:var(--fg); height:100vh; height:100dvh; overflow:hidden; }
img { max-width:100%; height:auto; }
.display { font-family:var(--font-heading); font-weight:var(--heading-weight); }

/* 4 frame + moving dotted lines ---------------------------------------- */
.dots:before, .dots:after, .external:before, .external:after {
  position:fixed; top:0; bottom:0; width:2px; z-index:1001; opacity:.4;
  background-image:linear-gradient(var(--line) 20%, transparent 0); background-size:100% 10px;
  animation:movebg .2s infinite linear; will-change:transform; }
@keyframes movebg { to { transform:translate3d(0,10px,0); } }
.dots:before { content:""; left:2.5%; }
.dots:after  { content:""; right:5%; }
.dots:after, .external:before { animation-direction:reverse; }
@media (min-width:64em) {
  .dots:before { left:5%; }
  .external:before { content:""; left:15%; }
  .external:after  { content:""; right:75%; }
}

/* 5 tabs ------------------------------------------------------------- */
nav { position:fixed; z-index:1002; top:0; left:0; width:100%; max-width:480px; letter-spacing:2px; color:var(--line); transition:color .6s; }
nav ul { list-style:none; display:flex; justify-content:space-between; text-align:center; padding:0; }
nav li { letter-spacing:1px; font-size:.75rem; text-transform:uppercase; white-space:nowrap; }
nav a { text-decoration:none; padding:.75rem; display:block; position:relative; transition:.5s; }
nav .tab-bio      { background:var(--purple-brown); color:var(--egg-shell); }
nav .tab-projects { background:var(--egg-shell); color:var(--purple-brown); }
nav .tab-find-me  { background:var(--accent); color:var(--on-accent); }
nav [aria-current="page"] { pointer-events:none; transform:scale(1.2); }
/* after a tab click: the new tab grows, the previous one shrinks back */
html[data-from] nav [aria-current="page"] { animation:tab-on .5s both; }
html[data-from="bio"] .tab-bio, html[data-from="projects"] .tab-projects, html[data-from="find-me"] .tab-find-me { animation:tab-off .5s both; }
@keyframes tab-on  { from { transform:none; } }
@keyframes tab-off { from { transform:scale(1.2); } }
@media (max-width:63.99em) { nav li { flex:1; } }
@media (min-width:64em) {
  nav { top:16px; left:120px; width:auto; }
  nav:after { content:""; border:16px solid; position:fixed; inset:0; z-index:1003; } /* the frame */
  nav li { margin:0 10px; }
  nav a { padding:1.25rem .75rem 0; }
}

/* 5b colour switcher: dots in the top right corner (radio buttons in the HTML) ---- */
.accents { position:fixed; z-index:1003; top:3rem; right:1.125rem; display:flex; border:0; padding:0; margin:0; min-width:0; --r:.25rem; }
/* each dot is a radio button drawn by hand: the colour disc, a gap, then a thin ring that shows only on the chosen one */
.accents input { appearance:none; -webkit-appearance:none; width:1.25rem; height:1.25rem; margin:0; border-radius:50%; cursor:pointer; outline:0; transition:transform .2s;
  background:radial-gradient(circle, var(--dot) calc(var(--r) - .5px), transparent calc(var(--r) + .5px) calc(var(--r) + 2.5px),
    var(--ring, transparent) calc(var(--r) + 3px) calc(var(--r) + 4px), transparent calc(var(--r) + 4.5px)); }
.accents input:hover { transform:scale(1.3); }
.accents input:checked, .accents input:focus-visible { --ring:var(--line); }
.accents [value="vermilion"] { --dot:var(--accent-vermilion); }
.accents [value="saffron"]   { --dot:var(--accent-saffron); }
.accents [value="lime"]      { --dot:var(--accent-lime); }
.accents [value="mint"]      { --dot:var(--accent-mint); }
.accents [value="cobalt"]    { --dot:var(--accent-cobalt); }
.accents [value="violet"]    { --dot:var(--accent-violet); }
/* the "changing colours" dot shows the whole palette as six slices */
.accents [value="cycle"] {
  background:radial-gradient(circle, transparent calc(var(--r) + 2.5px), var(--ring, transparent) calc(var(--r) + 3px)),
    conic-gradient(var(--accent-vermilion) 0 60deg, var(--accent-saffron) 0 120deg, var(--accent-lime) 0 180deg, var(--accent-mint) 0 240deg, var(--accent-cobalt) 0 300deg, var(--accent-violet) 0);   /* six sharp slices */
  -webkit-mask-image:radial-gradient(circle, #000 calc(var(--r) - .5px), transparent calc(var(--r) + .5px) calc(var(--r) + 2.5px), var(--ring-mask, transparent) calc(var(--r) + 3px) calc(var(--r) + 4px), transparent calc(var(--r) + 4.5px));
  mask-image:radial-gradient(circle, #000 calc(var(--r) - .5px), transparent calc(var(--r) + .5px) calc(var(--r) + 2.5px), var(--ring-mask, transparent) calc(var(--r) + 3px) calc(var(--r) + 4px), transparent calc(var(--r) + 4.5px)); }
.accents [value="cycle"]:checked, .accents [value="cycle"]:focus-visible { --ring-mask:#000; }
@media (min-width:64em) { .accents { top:1.8125rem; right:6.1875rem; --r:.3125rem; } }

/* 6 the big "PeHaa" letters with a sliding pattern ----------------------
   The word is written five times in the HTML: once as the plain coloured letters, then once per pattern layer (<i>).
   Each layer is the same word in one flat colour (section 2: --pattern-1 … 4), shown only where its SVG file
   has ink: the SVG is used as a mask. So the colours are plain CSS and follow the colour dots by themselves. */
.site-header { position:absolute; left:0; right:0; top:0; padding:64px 0; }
.pehaa { text-align:center; font-size:calc(30vw + 5rem); line-height:1; margin:auto; position:relative; z-index:0; color:var(--c);
  -webkit-mask-image:linear-gradient(#000 30%, transparent 80%); mask-image:linear-gradient(#000 30%, transparent 80%); /* fades out towards the bottom */
  animation:tint var(--color-time) var(--color-ease);         /* after a tab click: start from the previous page's colour */
  transition:color var(--color-time) var(--color-ease); }      /* a new colour picked with the dots fades in */
@keyframes tint { from { color:var(--from-c, var(--c)); } }
.pehaa i { display:none; }
@supports ((-webkit-background-clip:text) or (background-clip:text)) {
  .pehaa i { display:block; position:absolute; inset:0; font-style:normal; color:transparent; -webkit-background-clip:text; background-clip:text;
    -webkit-mask-repeat:repeat-x; mask-repeat:repeat-x; -webkit-mask-size:70vw auto; mask-size:70vw auto;
    /* where the layer sits: a start point, plus a shift for each page further along */
    --at:calc(var(--x0) + var(--step) * var(--travel) * var(--dx)) var(--y0);
    -webkit-mask-position:var(--at); mask-position:var(--at);
    animation:slide var(--slide-time) var(--slide-ease);        /* after a tab click: glide here from the previous page's spot */
    /* a page change without reload (js/router.js): the spot simply changes, and the layer glides there */
    transition:-webkit-mask-position var(--slide-time) var(--slide-ease), mask-position var(--slide-time) var(--slide-ease), background-color var(--color-time) var(--color-ease); }
  .pehaa i:nth-of-type(1) { background-color:var(--pattern-1); -webkit-mask-image:url(/img/contours-1.svg); mask-image:url(/img/contours-1.svg); --x0:0px;   --dx:-120px; --y0:15%; }
  .pehaa i:nth-of-type(2) { background-color:var(--pattern-2); -webkit-mask-image:url(/img/contours-2.svg); mask-image:url(/img/contours-2.svg); --x0:200px; --dx:30px;   --y0:25%; }
  .pehaa i:nth-of-type(3) { background-color:var(--pattern-3); -webkit-mask-image:url(/img/contours-3.svg); mask-image:url(/img/contours-3.svg); --x0:60px;  --dx:70px;   --y0:0%; }
  .pehaa i:nth-of-type(4) { background-color:var(--pattern-4); -webkit-mask-image:url(/img/contours-4.svg); mask-image:url(/img/contours-4.svg); --x0:0px;   --dx:120px;  --y0:0%; }
}
@keyframes slide { from {
  -webkit-mask-position:calc(var(--x0) + var(--from-step, var(--step)) * var(--travel) * var(--dx)) var(--y0);
  mask-position:calc(var(--x0) + var(--from-step, var(--step)) * var(--travel) * var(--dx)) var(--y0); } }
@media (min-width:64em) {
  /* parallax: the letters sit "further away" inside the scrolling box, so they scroll slower */
  .site-header { height:100vh; display:flex; pointer-events:none; padding:64px;
    transform:translate3d(0,0,-.5px) scale(1.5); transform-origin:0 0; }
  .pehaa i { -webkit-mask-size:800px auto; mask-size:800px auto; }
  .pehaa i:nth-of-type(2) { -webkit-mask-size:600px auto; mask-size:600px auto; }
  .pehaa i:nth-of-type(3), .pehaa i:nth-of-type(4) { -webkit-mask-size:700px auto; mask-size:700px auto; }
}

/* 7 layout ----------------------------------------------------------- */
.maincontainer { padding-top:calc(25vw + 6rem); height:100vh; height:100dvh;
  perspective:1px; perspective-origin:0 0; transform-style:preserve-3d;
  overflow-x:hidden; overflow-y:scroll; -webkit-overflow-scrolling:touch; }
main { position:relative; animation:enter-fade .75s ease-out both; }
main > .container { animation:enter-rise .75s ease-out both; } /* the rise is on the inner box, so main itself stays put for the page-change animation */
@keyframes enter-fade { from { opacity:0; } }
@keyframes enter-rise { from { transform:translate3d(0,32px,0); } }
/* page change without reload (js/router.js): the old text leaves, the new text enters, the new colour grows out of its tab */
main.leaving  { animation:leave .25s ease-in both; }
main.entering { animation-name:enter-fade-again; }
main.entering > .container { animation-name:enter-rise-again; }
@keyframes leave { to { opacity:0; transform:translate3d(0,32px,0); } }
@keyframes enter-fade-again { from { opacity:0; } }
@keyframes enter-rise-again { from { transform:translate3d(0,32px,0); } }
html.wiping main:not(.leaving) .container { background-image:none; } /* the new text must not paint its backdrop outside the growing colour */
.wipe { display:none; position:fixed; inset:0; z-index:-1; background:var(--bg); pointer-events:none; }
.container { margin:0 32px; background-image:none; }
.push-up { margin:0 auto; padding-bottom:33vh; }
.inner-container { max-width:900px; }
@media (min-width:64em) {
  .container { margin:0; background-image:linear-gradient(transparent 5vh, var(--bg) 20vh); }
  .push-up { padding-top:5vh; max-width:1140px; }
  .inner-container { max-width:900px; }
  .maincontainer { padding-top:55vh; }
  html.error-404 .maincontainer { padding-top:60vh; }
}

/* 8 text + links ----------------------------------------------------- */
a { color:inherit; }
a:hover { text-decoration:none; }
main a:not(.non-text) { padding:0 .15rem; transition:background-color .3s; background-color:transparent;
  background-image:linear-gradient(to bottom, transparent var(--underline-at), var(--accent) var(--underline-at)); }
main a:not(.non-text):hover { background-color:var(--accent); }
html.find-me main a:not(.non-text) { background-image:linear-gradient(to bottom, transparent var(--underline-at), var(--accent-deep) var(--underline-at)); }
html.find-me main a:not(.non-text):hover { background-color:var(--accent-deep); }
.subtitle { text-transform:uppercase; font-size:.875rem; letter-spacing:1px; max-width:420px; }
html.find-me .subtitle { color:var(--purple-brown); }
.page-header { margin-bottom:3rem; }
.page-header h1 { font-size:6rem; margin:0; line-height:1; }
html.projects .page-header h1 { color:var(--accent); }


/* 9 bio -------------------------------------------------------------- */
.bio-grid h1 { font-family:var(--font-heading); font-weight:var(--heading-weight); line-height:1; color:var(--accent); margin-bottom:24px; font-size:3.75rem; }
.bio-grid h1 span { display:block; }
.bio-grid p:not(:last-child) { margin-bottom:1.5rem; }
@media (min-width:64em) {
  .bio-grid { display:grid; grid-column-gap:20px; grid-template-columns:5fr 5fr 2fr; }
  .bio-grid h1 { text-align:right; position:relative; margin:0; min-width:0; }
  .bio-grid h1:after { content:""; position:absolute; right:-9px; top:0; bottom:0; border-right:2px solid var(--egg-shell); width:0; }
}
/* large screens: a wider text column (about 70 characters per line) */
@media (min-width:90em) {
  .bio-grid.push-up { max-width:1280px; }
  .bio-grid { grid-template-columns:4fr 6fr 2fr; }
}

/* 10 projects + find me entries ---------------------------------------- */
.entry { display:grid; grid-template-columns:2fr 4fr; grid-column-gap:20px; padding:1.5rem 0; margin-bottom:3rem; position:relative; }
.entry p, .entry .tags, .entry .list { grid-column:1/5; }
.entry h2 { font-size:2.5rem; line-height:1; margin-bottom:1.5rem; color:var(--purple-brown); }
.entry h2 span { position:relative; display:inline-block; }
.entry h2 span:before, .entry h2 span:after { content:""; position:absolute; top:0; height:50%; border-bottom:1px solid; }
.entry h2 span:before { right:calc(100% + 10px); width:50vw; }
.entry h2 span:after  { left:calc(100% + 10px); width:80vw; color:var(--accent); }
html.find-me .entry h2 span:after { color:var(--egg-shell); }
@media (min-width:64em) {
  .entry { grid-template-columns:1fr 1fr 4fr 2fr; }
  .entry h2 { grid-column:1/3; }
  .entry p, .entry .tags, .entry .list { grid-column:2/5; }
}
.take-me { margin-bottom:1.5rem; display:flex; align-items:center; justify-content:flex-end; grid-column:4/5; position:relative; }
.take-me a { text-decoration:none; display:inline-block; margin:0 0 0 .75rem; padding:.5rem; font-size:.75rem; text-transform:uppercase; letter-spacing:1px;
  background-size:205% 100%; background-position:100% 0; transition:background-position .35s ease-in-out;
  background-image:linear-gradient(-90deg, var(--accent) 51%, var(--purple-brown) 0); color:var(--on-accent); }
.take-me a:hover { color:var(--egg-shell); }
.take-me a:hover { background-position:0 0; }
html.find-me .take-me a { background-image:linear-gradient(-90deg, var(--egg-shell) 50%, var(--purple-brown) 0); color:var(--accent); line-height:0; }
.take-me svg { width:24px; height:24px; fill:currentColor; vertical-align:bottom; }
.entry p + p { margin-top:1rem; }   /* air between paragraphs of one entry */
.entry .list { margin:1rem 0 0; padding-left:1.25rem; }   /* a plain bullet list inside an entry */
.entry .list li { margin-bottom:.5rem; }
.tags { list-style:none; margin:24px 0; padding:0; display:flex; flex-wrap:wrap; justify-content:center; font-size:.875rem; opacity:.75; }
.tags li:not(:last-child):after { content:"\00b7"; margin:0 .5rem; }
.group-title { font-family:inherit; font-weight:400; text-transform:uppercase; font-size:.875rem; letter-spacing:2px; margin:5rem 0 2rem; }

/* 11 footer ---------------------------------------------------------- */
.site-footer { font-size:.875rem; position:fixed; writing-mode:vertical-rl; transform:rotate(180deg); bottom:1rem; right:0; line-height:1; z-index:1000; }
.site-footer span { display:inline-block; transform:rotate(90deg); }
.site-footer svg { width:12px; height:12px; fill:currentColor; }
html.bio .site-footer { color:var(--accent); }
html.bio .site-footer span, html.find-me .site-footer span { color:var(--egg-shell); }
html.find-me .site-footer { color:var(--purple-brown); }
html.projects .site-footer span { color:var(--accent); }
@media (min-width:64em) { .site-footer { right:1.75rem; bottom:2rem; } }

/* 12 reveal on scroll (only when JavaScript runs: html gets class "js") --- */
html.js .reveal { opacity:0; transform:translate3d(0,50px,0); }
html.js .reveal p { transform:translate3d(0,20px,0); transition:.8s .5s; }
html.js .reveal .take-me { transform:rotateX(90deg); transition:.8s .5s; }
html.js .reveal.visible { animation:fadein 1s 1 forwards; }
html.js .reveal.visible p { transform:none; }
html.js .reveal.visible .take-me { transform:none; }
@keyframes fadein { to { opacity:1; transform:translate3d(0,0,0); } }

/* 13 page-to-page animation, fallback ----------------------------------
   Normally js/router.js changes page without a reload (sections 5, 6 and 7 animate it).
   This section is used when a link does a real page load (JavaScript off or failed):
   the browser then animates between the two pages (View Transitions).
   Browsers without this feature skip the colour wipe; the slide still plays. */
@view-transition { navigation:auto; }
.pehaa { view-transition-name:pehaa; }
main   { view-transition-name:content; }
nav    { view-transition-name:tabs; }
.site-footer { view-transition-name:footer; }

::view-transition-old(root) { animation:none; }
::view-transition-new(root) { animation:wipe var(--wipe-time) var(--wipe-ease) both; }
@keyframes wipe {
  from { clip-path:inset(var(--y) calc(100% - var(--x) - var(--tab)) calc(100% - var(--y) - 2.6rem) var(--x)); }
  to   { clip-path:inset(0); }
}
/* letters, tabs, footer: show the live new ones at once, they animate by themselves */
::view-transition-group(pehaa), ::view-transition-group(content),
::view-transition-group(tabs),  ::view-transition-group(footer) { animation:none; }
::view-transition-old(pehaa), ::view-transition-old(tabs), ::view-transition-old(footer) { display:none; }
::view-transition-new(pehaa), ::view-transition-new(tabs), ::view-transition-new(footer),
::view-transition-new(content) { animation:none; }
/* while the wipe runs, the new text block must not paint its page-colour backdrop outside the wipe */
html:active-view-transition .container { background-image:none; }
/* old text fades out quickly */
::view-transition-old(content) { animation:vt-leave .25s ease-in both; }
@keyframes vt-leave { to { opacity:0; } }
