/* ==========================================================================
   geleijn-it.nl

   The whole system is read off the logo:
     · 17deg shear, measured from the stems of the mark
     · zero radii, the mark is cut and never rounded
     · one teal, used as a field or a marker and never as decoration
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */

/* Dark is the default, not the os preference. The toggle opts into light and
   the choice is remembered; with no javascript the page stays dark. */
:root {
  color-scheme: dark;

  --paper: #101314;
  --paper-2: #181c1e;
  --ink: #ecebe5;
  --ink-2: #8d9497;
  --rule: #282d30;
  --teal: #5ac6cd;
  --teal-ink: #5ac6cd;
  --on-teal: #10282a;

  --shear: -17deg;
  --gutter: clamp(20px, 5.5vw, 80px);
  --bar: 60px;

  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

:root[data-theme='light'] {
  color-scheme: light;

  --paper: #f2f0eb;
  --paper-2: #e9e6df;
  --ink: #16191b;
  --ink-2: #5e6467;
  --rule: #d5d1c8;
  --teal-ink: #0c6a72;
}

/* --- reset ---------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
svg { display: block; }

a { color: inherit; }

::selection {
  background: var(--teal);
  color: var(--on-teal);
}

:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 3px;
}

/* --- language switch ------------------------------------------------------
   Both languages ship in the markup; the inactive one is removed from the
   render tree (and therefore from the accessibility tree) entirely.          */

html[data-lang='nl'] body [lang='en'],
html[data-lang='en'] body [lang='nl'] { display: none; }

/* --- primitives ----------------------------------------------------------- */

.wrap {
  max-width: 1340px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* The shear, as a reusable object: a small cut bar in the brand teal. */
.tick {
  display: inline-block;
  width: 10px;
  height: 0.72em;
  background: var(--teal);
  transform: skewX(var(--shear));
  vertical-align: -0.05em;
}

.arrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 400;
}

/* Underline that grows from the left rather than fading in. */
.ul {
  text-decoration: none;
  background-image: linear-gradient(var(--teal-ink), var(--teal-ink));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.28s var(--ease);
}
.ul:hover { background-size: 100% 2px; }

/* --- masthead ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.masthead .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: block;
  color: var(--ink);
  line-height: 0;
}
.brand .wordmark {
  width: 122px;
  height: auto;
}
.brand .mark { fill: var(--teal); }

.masthead nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
}

.masthead nav a {
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.18s var(--ease);
}
.masthead nav a:hover { color: var(--ink); }

.lang {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
}
.lang button {
  appearance: none;
  border: 0;
  padding: 2px 1px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 0.18s var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed='true'] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--teal);
}
.lang .sep { opacity: 0.45; }

.theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -6px 0;
  padding: 0;
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.18s var(--ease);
}
.theme:hover { color: var(--ink); }
.theme svg { width: 16px; height: 16px; }

/* Show the icon for the theme the button switches to. */
:root[data-theme='light'] .theme .moon,
:root:not([data-theme='light']) .theme .sun { display: block; }
:root[data-theme='light'] .theme .sun,
:root:not([data-theme='light']) .theme .moon { display: none; }

/* Tight, but everything still fits: the wordmark and the gaps give a little,
   and the link drops its .nl rather than disappearing. */
@media (max-width: 620px) {
  .brand .wordmark { width: 96px; }
  .masthead .wrap { gap: 12px; }
  .masthead nav { gap: 12px; }
  .masthead .dn-link .tld { display: none; }
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(56px, 11vh, 132px) clamp(48px, 9vh, 104px);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(40px, 6vw, 76px);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    align-items: end;
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-2);
  margin-bottom: clamp(24px, 4vh, 40px);
}

h1 {
  font-size: clamp(3.6rem, 13.5vw, 10.5rem);
  font-weight: 300;
  line-height: 0.85;
  letter-spacing: -0.038em;
}
h1 .surname { display: block; }

/* Draws once on load, from the left. Not a scroll effect. */
.rule-draw {
  height: 1px;
  margin: clamp(28px, 5vh, 46px) 0 clamp(26px, 4vh, 36px);
  background: var(--ink);
  transform-origin: left;
  animation: draw 1.1s var(--ease) both;
}
@keyframes draw { from { transform: scaleX(0); } }

.lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.3rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
}
.lead strong { font-weight: 500; }

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 4vw, 44px);
  margin-top: clamp(30px, 5vh, 46px);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: clamp(0.85rem, 0.8rem + 0.2vw, 1rem);
}
.hero-contact a { text-decoration: none; }

/* spec block, the right-hand column */
.spec { border-top: 1px solid var(--ink); }

.spec div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}
.spec dt {
  color: var(--ink-2);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.spec dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
}
.spec dd a { text-decoration: none; }

/* --- section scaffolding -------------------------------------------------- */

section { border-bottom: 1px solid var(--rule); }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-top: clamp(52px, 9vh, 100px);
  color: var(--ink-2);
}
.sec-head .num { color: var(--teal-ink); }

h2 {
  max-width: 20ch;
  margin-top: clamp(18px, 3vh, 26px);
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.028em;
}

/* --- 01 · wie ------------------------------------------------------------- */

.who { padding-bottom: clamp(52px, 9vh, 100px); }

.who-grid {
  display: grid;
  gap: clamp(30px, 5vw, 68px);
  margin-top: clamp(34px, 6vh, 58px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 860px) {
  .who-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
}

.portrait { margin: 0; }
.portrait .frame { position: relative; }
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.55s var(--ease);
}
@media (hover: hover) {
  .portrait:hover img { filter: grayscale(0) contrast(1); }
}

/* Brand angle, cut into the bottom-left corner of the frame. */
.portrait .frame::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: clamp(58px, 9vw, 108px);
  height: 11px;
  background: var(--teal);
  transform: skewX(var(--shear));
  transform-origin: bottom left;
}

.portrait figcaption {
  margin-top: 13px;
  color: var(--ink-2);
}

.who-text p {
  max-width: 42ch;
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
}
.who-text p + p { margin-top: 1.1em; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(26px, 4vh, 38px);
  padding: 14px 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    gap 0.28s var(--ease);
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  gap: 20px;
}

/* --- 02 · disciplines ----------------------------------------------------- */

.work { padding-bottom: clamp(52px, 9vh, 100px); }

.rows {
  margin-top: clamp(34px, 6vh, 60px);
  border-top: 1px solid var(--ink);
}

.rows li {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 4px 18px;
  padding: clamp(18px, 3vh, 26px) 0 clamp(18px, 3vh, 26px) 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 0.3s var(--ease);
}

@media (min-width: 780px) {
  .rows li {
    grid-template-columns: 2.6rem minmax(0, 15rem) minmax(0, 1fr);
    align-items: baseline;
  }
}

.rows .n {
  color: var(--ink-2);
  transition: color 0.22s var(--ease);
}
.rows h3 {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.012em;
}
.rows p {
  grid-column: 2 / -1;
  max-width: 52ch;
  color: var(--ink-2);
  font-weight: 300;
}
@media (min-width: 780px) {
  .rows p { grid-column: 3; }
}

/* The teal cut bar slides in from the left edge on hover. */
.rows li::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 50%;
  width: 12px;
  height: 26px;
  margin-top: -13px;
  background: var(--teal);
  transform: skewX(var(--shear)) scaleY(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

@media (hover: hover) and (min-width: 780px) {
  .rows li:hover { padding-left: 22px; }
  .rows li:hover::before { transform: skewX(var(--shear)) scaleY(1); }
  .rows li:hover .n { color: var(--teal-ink); }
}

/* --- 03 · devnomads ------------------------------------------------------- */

.dn {
  position: relative;
  overflow: hidden;
  background: var(--teal);
  color: var(--on-teal);
  border-bottom: 0;
}

/* The mark, oversized and bled off the edge: a printer's watermark on the
   one panel that has room for it. */
.dn::after {
  content: '';
  position: absolute;
  left: -4%;
  bottom: -34%;
  width: clamp(260px, 30vw, 460px);
  aspect-ratio: 192 / 172;
  background: var(--on-teal);
  -webkit-mask: url('../favicon.svg') no-repeat center / contain;
  mask: url('../favicon.svg') no-repeat center / contain;
  opacity: 0.07;
  pointer-events: none;
}

/* Below this it stops reading as a bled mark and starts reading as a smudge. */
@media (max-width: 780px) {
  .dn::after { display: none; }
}

.dn .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(30px, 5vw, 72px);
  padding-block: clamp(56px, 10vh, 116px);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .dn .wrap {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
}

.dn .sec-head { padding-top: 0; color: rgba(16, 40, 42, 0.62); }
.dn .sec-head .num { color: var(--on-teal); }
.dn h2 { max-width: 16ch; }

.dn p {
  max-width: 48ch;
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.62;
}
.dn .aside { padding-top: clamp(4px, 2vh, 40px); }
.dn .aside p + .cta { margin-top: clamp(26px, 4vh, 36px); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  background: var(--on-teal);
  color: var(--teal);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: gap 0.28s var(--ease);
}
.cta:hover { gap: 22px; }
.cta:focus-visible { outline-color: var(--on-teal); }

/* --- 04 · contact --------------------------------------------------------- */

.contact { padding-bottom: clamp(52px, 9vh, 100px); }

.contact .intro {
  max-width: 44ch;
  margin-top: 20px;
  color: var(--ink-2);
  font-weight: 300;
}

.sheet {
  margin-top: clamp(34px, 6vh, 58px);
  border-top: 1px solid var(--ink);
}

.sheet div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: clamp(15px, 2.4vh, 20px) 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 640px) {
  .sheet div {
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
  }
}

.sheet dt { color: var(--ink-2); }
.sheet dd {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  font-weight: 300;
}
.sheet dd a { text-decoration: none; }

/* --- footer --------------------------------------------------------------- */

footer { border-bottom: 0; }

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  align-items: baseline;
  padding-block: clamp(28px, 5vh, 44px) clamp(34px, 6vh, 56px);
  color: var(--ink-2);
}
/* Two ends, like the masthead; wraps to two lines when there is no room. */
footer .legal { flex: 0 1 auto; }

/* --- motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- print ---------------------------------------------------------------- */

@media print {
  /* Matches [data-theme] too, so it outranks the light-theme block. */
  :root,
  :root[data-theme] {
    color-scheme: light;
    --paper: #fff;
    --ink: #000;
    --ink-2: #444;
    --rule: #bbb;
  }
  .masthead { position: static; border-bottom: 1px solid var(--rule); }
  .lang, .theme, .hero::after, .cta { display: none; }
  .dn { background: none; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .dn .sec-head { color: var(--ink-2); }
  section, .hero { break-inside: avoid; }
  a { text-decoration: none; }
}
