/* Nigel Groen — nigelgroen.com */

:root {
  --ink: #111111;
  --ink-92: rgba(17, 17, 17, .92);
  --ink-66: rgba(17, 17, 17, .66);
  --ink-58: rgba(17, 17, 17, .58);
  --ink-40: rgba(17, 17, 17, .4);
  --ink-18: rgba(17, 17, 17, .18);
  --ink-15: rgba(17, 17, 17, .15);
  --green: #4F6152;
  --band-h: clamp(104px, 20vw, 150px);
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: Newsreader, Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: #000; }
::selection { background: #d8d8d8; color: #fff; }
img { max-width: 100%; }

.page {
  position: relative;
  min-height: 100vh;
  padding: 0 clamp(20px, 5vw, 32px) 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--band-h);
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  box-sizing: border-box;
}

.band-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .72);
}

.column {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
}

/* header ------------------------------------------------------------ */

.header {
  padding-top: calc(var(--band-h) + 16px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-right: -11px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  opacity: .62;
  transition: opacity .15s ease;
}

.nav a:hover { opacity: 1; }
.nav img { display: block; width: 22px; height: 22px; }

/* intro ------------------------------------------------------------- */

.intro {
  padding: clamp(52px, 10vw, 88px) 0 0;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 24px);
  flex-wrap: wrap;
}

.headshot {
  width: clamp(72px, 18vw, 96px);
  height: clamp(72px, 18vw, 96px);
  flex: none;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}

.intro-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intro-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 9vw, 52px);
  line-height: 1.05;
  letter-spacing: -.015em;
}

.subtitle {
  font-size: 14px;
  letter-spacing: .22em;
  color: var(--ink-58);
}

/* bio + owls -------------------------------------------------------- */

.bio-section {
  position: relative;
  padding: clamp(32px, 6vw, 44px) 0 0;
}

.bio {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-92);
  text-wrap: pretty;
  max-width: 52ch;
}

.bio p { margin: 0; }
.bio a { border-bottom: 1px solid var(--ink-40); }

/* The art's opaque right edge sits at 875/1024 of the box, so the
   overhang that lines its edge up with the column is width * 0.1455. */
.owls {
  position: absolute;
  display: block;
  height: auto;
  z-index: 0;
  pointer-events: none;
  top: -24px;
  width: min(460px, 96%);
  right: calc(min(460px, 96%) * -0.1455);
  opacity: .16;
}

@media (min-width: 901px) {
  /* Two mask layers combined with `add`: alpha = min(1, notLeft + notTextBand),
     so the art only fades where it sits BOTH over the left column AND beside
     the paragraph band — branches above and below stay fully opaque. */
  .owls {
    top: -56px;
    width: min(520px, 52vw);
    right: calc(min(520px, 52vw) * -0.1455);
    opacity: 1;
    -webkit-mask-image:
      linear-gradient(to right, rgba(0,0,0,.16) 0%, rgba(0,0,0,.16) 31%, rgba(0,0,0,1) 37%, rgba(0,0,0,1) 100%),
      linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 7%, rgba(0,0,0,0) 13%, rgba(0,0,0,0) 47%, rgba(0,0,0,1) 55%, rgba(0,0,0,1) 100%);
    mask-image:
      linear-gradient(to right, rgba(0,0,0,.16) 0%, rgba(0,0,0,.16) 31%, rgba(0,0,0,1) 37%, rgba(0,0,0,1) 100%),
      linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 7%, rgba(0,0,0,0) 13%, rgba(0,0,0,0) 47%, rgba(0,0,0,1) 55%, rgba(0,0,0,1) 100%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
  }
}

/* sections ---------------------------------------------------------- */

.work { padding: clamp(64px, 12vw, 104px) 0 0; }
.extras,
.projects { padding: clamp(56px, 10vw, 88px) 0 0; }

.column h2 {
  margin: 0 0 26px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 26px;
  letter-spacing: -.01em;
}

.rule {
  flex: 1;
  height: 1px;
  background: var(--ink-18);
  transform: translateY(-6px);
}

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--ink-15);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.row-title {
  font-size: 16px;
  letter-spacing: -.005em;
}

.row-title a { border-bottom: 1px solid var(--ink-40); }

.row-blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-66);
  max-width: 56ch;
  text-wrap: pretty;
}

.row-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-58);
  white-space: nowrap;
}

.row-simple {
  padding: 16px 0;
  border-top: 1px solid var(--ink-15);
  font-size: 16px;
  text-wrap: pretty;
}

.row-simple a { border-bottom: 1px solid var(--ink-40); }

/* projects ---------------------------------------------------------- */

.gh {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}

.gh-label {
  font-size: 16px;
  color: var(--ink-66);
}

.gh img {
  display: block;
  width: 100%;
  height: auto;
}

.selected {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: rgba(17, 17, 17, .55);
  margin-bottom: 10px;
}

/* tail -------------------------------------------------------------- */

.treeline {
  display: block;
  width: 100%;
  max-width: 82%;
  height: auto;
  margin: 28px auto 0;
  opacity: .85;
}

.footer {
  padding: clamp(72px, 14vw, 120px) 0 0;
  display: flex;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-58);
}
