:root {
  --bg: #000;
  --fg: #fff;
  --text: #bbb;
  --muted: #888;
  --rule: #222;
  --cyan: #24cafe;
  --lime: #cafe24;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font: 12px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: background-color 2s, opacity 1s;
}
a { color: var(--fg); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

h1, h2 {
  color: var(--fg);
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  margin: 0;
}
h1 { letter-spacing: 7px; }
h2 { letter-spacing: 5px; color: var(--muted); margin-top: 6px; }

@keyframes fade-in { from { opacity: 0.01; } }

/* Front page */

body.home {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
#card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "mark name"
    "mark social"
    "www  www"
    "tag  tag";
  column-gap: 48px;
  width: min(760px, 100% - 32px);
  padding: 48px 0;
  animation: fade-in 3s ease both;
}
#mark {
  grid-area: mark;
  display: block;
  width: clamp(180px, 36vw, 300px);
  height: auto;
  transition: filter 0.4s;
}
#mark:hover { filter: drop-shadow(0 0 12px var(--glow, var(--cyan))); }
#mark.boing { animation: boing 0.4s ease; }
@keyframes boing {
  30% { transform: scale(1.12, 0.88); }
  60% { transform: scale(0.95, 1.05); }
}
#card header { grid-area: name; align-self: end; }

.social {
  grid-area: social;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.social a {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  color: var(--fg);
}
.social svg, .social .icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  transition: transform 0.2s, color 0.2s;
}
/* Logos without an SVG: a white PNG used as a mask, so they take the text colour. */
.social .icon {
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon.maindeck { --icon: url(/logos/maindeck.png); }
.icon.qtpass { --icon: url(/logos/qtpass.png); }
.icon.badgeteam { --icon: url(/logos/badgeteam.png); }
.icon.aidtoukraine { --icon: url(/logos/aidtoukraine.png); }
.social a:hover :is(svg, .icon), .social a:focus-visible :is(svg, .icon) {
  color: var(--cyan);
  transform: scale(1.5);
}
.social a.launch :is(svg, .icon) {
  z-index: 1;
  transform: scale(32);
  opacity: 0;
  transition: transform 1s ease-in, opacity 1s ease-in;
}

.www {
  grid-area: www;
  margin: 32px 0 0;
  color: var(--cyan);
  font-size: clamp(22px, 7.4vw, 58px);
  font-weight: bold;
  letter-spacing: 0.28em;
  line-height: 1.1;
  white-space: nowrap;
}
/* Once the monogram is clicked, site.js turns it into a neon tube (.lit): a white-hot core
   in a glow, which now and then stutters, like a tube that's not quite warmed up, and a
   longer timeline on top: a bad letter, a drift through the monogram's colours, a power
   cut. --neon is registered so the colour can drift. */
@property --neon {
  syntax: '<color>';
  inherits: true;
  initial-value: #24cafe;
}
#card .www.lit {
  --neon: var(--cyan);
  color: #e8fbff;
  text-shadow: 0 0 2px #fff, 0 0 8px var(--neon), 0 0 18px var(--neon), 0 0 36px var(--neon),
    0 0 70px color-mix(in srgb, var(--neon) 55%, transparent);
  animation: neon 9s infinite;
  transition: --neon 2.5s ease;
}
#card .www.lit.flash { transition-duration: 0.15s; }
@keyframes neon {
  0%, 88%, 89.4%, 90.6%, 100% {
    color: #e8fbff;
    text-shadow: 0 0 2px #fff, 0 0 8px var(--neon), 0 0 18px var(--neon), 0 0 36px var(--neon),
      0 0 70px color-mix(in srgb, var(--neon) 55%, transparent);
  }
  88.7%, 90% {
    color: #4f8fa3;
    text-shadow: 0 0 4px color-mix(in srgb, var(--neon) 30%, transparent);
  }
}
/* A letter whose tube is out: just the glass, faintly. */
#card .www.lit span.off {
  color: rgba(150, 220, 240, 0.16);
  text-shadow: none;
}
/* A letter whose tube is going: on, off, on, off, irregularly. */
#card .www.lit span.bad { animation: bad 1.3s steps(1) infinite; }
@keyframes bad {
  0%, 9%, 31%, 47%, 72%, 81% { color: rgba(150, 220, 240, 0.16); text-shadow: none; }
  5%, 22%, 38%, 60%, 76%, 90% { color: inherit; text-shadow: inherit; }
}
.tag {
  grid-area: tag;
  margin: 12px 0 0;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

body.leaving { background-color: var(--fg); }
body.leaving .social li, body.leaving .www, body.leaving .tag {
  opacity: 0;
  transition: opacity 2s;
}
body.leaving .social li:has(.launch) { opacity: 1; }
body.fading { opacity: 0; }

@media (max-width: 560px) {
  #card {
    grid-template-columns: 1fr;
    grid-template-areas: "mark" "name" "social" "www" "tag";
    justify-items: center;
    text-align: center;
  }
  #mark { width: min(60vw, 240px); margin-bottom: 24px; }
  .social { justify-content: center; gap: 12px; }
  .social a { width: 34px; height: 34px; }
  .www { letter-spacing: 0.12em; }
  .tag { font-size: 12px; letter-spacing: 2px; }
}

/* CV page */

body.cv {
  font-size: 14px;
  color: var(--text);
}
.page {
  width: min(960px, 100% - 32px);
  margin: 0 auto;
  padding: 48px 0 64px;
  animation: fade-in 1s ease both;
}
.page > header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
#home img {
  display: block;
  width: 72px;
  height: auto;
  transition: filter 0.4s;
}
#home:hover img { filter: drop-shadow(0 0 8px var(--cyan)); }
.page > header .www {
  margin: 0 0 0 auto;
  font-size: 20px;
  letter-spacing: 0.2em;
}
/* Switch between the English and the Dutch CV, in the space above the header so annejan.com keeps its place. */
.page > header .lang {
  position: absolute;
  top: -36px;
  right: 0;
  padding: 4px 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 56px;
  margin-top: 40px;
}
h3 {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
section + section { margin-top: 40px; }
section p { margin: 0 0 12px; }
/* Links in running text need more than colour to stand out (WCAG 1.4.1). */
main section p a { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 2px; }
main section p a:hover, main section p a:focus-visible { text-decoration-color: currentColor; }
.profile p { color: var(--fg); font-size: 16px; line-height: 1.6; }

.entry { margin-bottom: 24px; }
.entry h4 {
  margin: 0;
  color: var(--fg);
  font-size: 14px;
}
.entry h4 span { color: var(--muted); font-weight: normal; }
.entry .when {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}
.entry p { margin: 0 0 6px; }
.entry .tech { color: var(--lime); font-size: 12px; }

aside ul { list-style: none; margin: 0; padding: 0; }
aside li { margin-bottom: 4px; }
aside small { color: var(--muted); }
aside ul + p { margin-top: 12px; }

@media (max-width: 720px) {
  .columns { grid-template-columns: 1fr; gap: 0; }
  aside { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  aside section + section { margin-top: 0; }
  aside section { margin-bottom: 32px; }
  .page > header .www { display: none; }
  /* Without annejan.com, line the switch up with the end of the rule (letter-spacing also follows the last letter). */
  .page > header .lang { margin-right: -4px; }
}

@media (prefers-reduced-motion: reduce) {
  #card, .page { animation: none; }
  body, .social svg, .social .icon, #mark, #home img { transition: none; }
}

.prods { list-style: none; margin: 0; padding: 0; }
.prods li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.prods li > a { color: var(--fg); font-weight: bold; }
.prods .meta { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.prods .win { color: var(--lime); font-weight: bold; }
.prods small { margin-left: auto; font-size: 12px; }
