/* kristofferrisa.no — dark editorial. No framework, no build step. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --bg-raised: #131311;
  --line: #262521;
  --line-strong: #3a3832;
  --text: #ecebe6;
  --text-muted: #a3a097;
  --text-faint: #6f6c64;
  --accent: #c9a96e;
  --accent-soft: rgb(201 169 110 / 0.12);

  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 72rem;
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* A faint grain and a warm glow, so the black is not flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgb(201 169 110 / 0.09), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgb(201 169 110 / 0.05), transparent 60%);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  z-index: 100;
}
.skip:focus {
  top: 1rem;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgb(11 11 10 / 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.25rem;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.mark svg {
  width: 1.9rem;
  height: 1.9rem;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
.nav a {
  text-decoration: none;
  color: var(--text-muted);
}
.nav a:hover {
  color: var(--text);
}
.nav .lang {
  border: 1px solid var(--line-strong);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text);
}
.nav .lang:hover {
  border-color: var(--accent);
}
@media (max-width: 47.99rem) {
  .hide-sm {
    display: none;
  }
}

/* ---------- Type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(3.25rem, 10vw, 8.5rem);
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
}
h3 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.15;
}
em,
.serif-italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}
.lead {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 38em;
}
.muted {
  color: var(--text-muted);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100svh, 62rem);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 44.99rem) {
  .hero canvas {
    opacity: 0.38;
  }
}
.hero-inner {
  padding-block: clamp(5rem, 14vh, 9rem) clamp(3rem, 8vh, 5rem);
}
.hello {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--accent);
  margin: 0 0 0.75rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
}
.wave {
  display: inline-block;
  font-style: normal;
  transform-origin: 70% 80%;
}
.js .wave {
  animation: wave 2.4s var(--ease) 1.1s 1 both;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}
.hero h1 {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  font-size: clamp(3.75rem, 12vw, 10rem);
  line-height: 0.92;
}
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.hero h1 .line > span {
  display: inline-block;
}
.js .hero h1 .line > span {
  animation: rise 1.2s var(--ease) both;
}
.js .hero h1 .line:nth-child(2) > span {
  animation-delay: 0.14s;
}
@keyframes rise {
  from { transform: translateY(105%); }
  to { transform: none; }
}
.hero h1 em {
  padding-left: 0.04em;
}
.hero .lead {
  max-width: 34em;
  margin-bottom: 2.5rem;
  color: var(--text);
  opacity: 0.86;
}
.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.status .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #7fbf8a;
  box-shadow: 0 0 0 0 rgb(127 191 138 / 0.6);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(127 191 138 / 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgb(127 191 138 / 0); }
}
.status b {
  font-weight: 500;
  color: var(--text);
}
.status .sep {
  color: var(--text-faint);
}
.status time {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  .js .hero h1 .line > span,
  .js .wave,
  .status .dot {
    animation: none;
  }
}

/* Scroll progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}
.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn .arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(5rem, 12vw, 9rem);
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 60rem) {
  .section-head {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 3rem;
  }
}
.section-index {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 0.9rem;
}
.section-index b {
  color: var(--accent);
  font-weight: 500;
  margin-right: 0.6rem;
}
.section-head .lead {
  margin-top: 1.5rem;
}

/* Pillars: the AI work */
.pillars {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 72rem) {
  .pillars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.pillar {
  padding: 2.25rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .pillar {
    padding: 2.5rem 2rem 2.75rem;
    border-right: 1px solid var(--line);
  }
  .pillar:nth-child(2n) {
    border-right: 0;
  }
}
@media (min-width: 72rem) {
  .pillar:nth-child(2n) {
    border-right: 1px solid var(--line);
  }
  .pillar:first-child {
    padding-left: 0;
  }
  .pillar:last-child {
    border-right: 0;
    padding-right: 0;
  }
}
.pillar .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 2.5rem;
  display: block;
}
.pillar h3 {
  margin-bottom: 1rem;
}
.pillar p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* Quote / principle */
.principle {
  margin: clamp(4rem, 8vw, 6rem) 0 0;
  max-width: 52rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.2;
  text-wrap: balance;
}
.principle::before {
  content: "“";
  display: block;
  color: var(--accent);
  font-size: 1.6em;
  line-height: 0.6;
  margin-bottom: 0.75rem;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.role {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 3rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.role:last-child {
  border-bottom: 1px solid var(--line);
}
@media (min-width: 60rem) {
  .role {
    grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: baseline;
  }
}
.role .when {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.role .what h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}
.role .what .org {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.role .desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.role .desc p:last-child {
  margin-bottom: 0;
}
.role.is-current .when::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  vertical-align: 0.1em;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.tags li {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
}

/* Skills */
.skills {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
@media (min-width: 48rem) {
  .skills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 3rem;
  }
}
.skill {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.skill h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.skill ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.skill li {
  padding: 0.2rem 0;
}

/* Education */
.edu {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 3rem;
}
@media (min-width: 48rem) {
  .edu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.edu article {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.edu .when {
  font-size: 0.8125rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.edu h3 {
  font-size: 1.5rem;
  margin: 0.5rem 0 0.4rem;
}
.edu p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* Contact */
.contact {
  padding-block: clamp(6rem, 14vw, 11rem);
  border-top: 1px solid var(--line);
}
.contact h2 {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  margin-bottom: 2.5rem;
}
.contact .mail {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2rem;
  overflow-wrap: anywhere;
}
.contact .mail:hover {
  border-bottom-color: var(--accent);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}
.links a {
  text-decoration: none;
  color: var(--text-muted);
}
.links a:hover {
  color: var(--accent);
}
.links a::after {
  content: " ↗";
  color: var(--text-faint);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

/* 404 */
.notfound {
  min-height: calc(100vh - 4.25rem - 5rem);
  display: grid;
  align-content: center;
  padding-block: 6rem;
}
.notfound h1 {
  margin-bottom: 1.5rem;
}

/* ---------- Reveal on scroll (only when JS has run) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}
[data-delay="1"] {
  --delay: 80ms;
}
[data-delay="2"] {
  --delay: 160ms;
}
[data-delay="3"] {
  --delay: 240ms;
}
[data-delay="4"] {
  --delay: 320ms;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Print: the page is the CV ---------- */

@media print {
  @page {
    size: A4;
    margin: 16mm 16mm 14mm;
  }
  :root {
    --bg: #fff;
    --text: #111;
    --text-muted: #333;
    --text-faint: #666;
    --line: #ddd;
    --line-strong: #bbb;
    --accent: #7a5c25;
  }
  html {
    font-size: 10pt;
  }
  body {
    background: #fff;
    color: #111;
  }
  body::before,
  .site-header,
  .site-footer,
  .actions,
  .skip,
  .no-print {
    display: none !important;
  }
  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .wrap {
    max-width: none;
    padding: 0;
  }
  .hero {
    padding: 0 0 6mm;
  }
  .hero h1 {
    font-size: 30pt;
    margin-bottom: 3mm;
  }
  .hero .lead {
    font-size: 11pt;
    margin-bottom: 0;
    max-width: none;
  }
  .hero-meta {
    margin-top: 5mm;
    padding-top: 3mm;
  }
  .section,
  .contact {
    padding-block: 6mm;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 4mm;
  }
  .section-index {
    padding: 0;
  }
  h2 {
    font-size: 18pt;
  }
  .section-head .lead {
    font-size: 10pt;
    margin-top: 2mm;
  }
  .principle {
    display: none;
  }
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillar,
  .pillar:first-child,
  .pillar:last-child {
    padding: 3mm 4mm 3mm 0;
    border-right: 0;
  }
  .pillar .num {
    margin-bottom: 1mm;
  }
  .pillar h3 {
    font-size: 13pt;
    margin-bottom: 1mm;
  }
  .role {
    grid-template-columns: 30mm 1fr 1.3fr;
    padding: 3mm 0;
    break-inside: avoid;
  }
  .role .what h3,
  .skill h3,
  .edu h3 {
    font-size: 13pt;
  }
  .role.is-current .when::after {
    display: none;
  }
  .skills {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 6mm;
  }
  .skill,
  .edu article {
    padding: 3mm 0;
    break-inside: avoid;
  }
  .edu {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 6mm;
  }
  .contact h2 {
    font-size: 16pt;
    margin-bottom: 2mm;
  }
  .contact .mail {
    font-size: 13pt;
  }
  .links {
    margin-top: 2mm;
  }
  .links a::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
  }
  a {
    text-decoration: none;
  }
}

/* ---------- The person: bento ---------- */

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 48rem) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .bento .c-sea { grid-column: span 4; }
  .bento .c-keys { grid-column: span 2; }
  .bento .c-build { grid-column: span 2; }
  .bento .c-write { grid-column: span 2; }
  .bento .c-book { grid-column: span 2; }
}
.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), rgb(201 169 110 / 0.13), transparent 60%);
}
.card:hover {
  border-color: var(--line-strong);
}
.card:hover::before {
  opacity: 1;
}
.card .k {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: auto;
  padding-bottom: 2rem;
}
.card h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 0.75rem;
}
.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}
.card a {
  color: var(--text);
}
.c-sea {
  background:
    radial-gradient(40rem 20rem at 100% 100%, rgb(70 110 140 / 0.16), transparent 70%),
    var(--bg-raised);
}
.c-sea .coords {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-top: 1.5rem;
}
.c-sea svg.waves {
  position: absolute;
  right: -2rem;
  bottom: -0.5rem;
  width: 70%;
  max-width: 28rem;
  opacity: 0.5;
  pointer-events: none;
}
.js .c-sea svg.waves path {
  animation: drift 9s ease-in-out infinite alternate;
}
.js .c-sea svg.waves path:nth-child(2) { animation-duration: 11s; animation-delay: -3s; }
.js .c-sea svg.waves path:nth-child(3) { animation-duration: 13s; animation-delay: -6s; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-2.5rem); }
}
.keycaps {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.9em;
  height: 1.9em;
  padding: 0 0.45em;
  font: 500 0.8125rem/1 var(--sans);
  color: var(--text);
  background: linear-gradient(#1d1c19, #141311);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
}
.keycaps kbd {
  min-width: 2.4rem;
  height: 2.4rem;
  font-size: 0.9375rem;
}
.js .keycaps kbd {
  animation: press 4.8s var(--ease) infinite;
}
.js .keycaps kbd:nth-child(2) { animation-delay: 0.25s; }
.js .keycaps kbd:nth-child(3) { animation-delay: 0.5s; }
@keyframes press {
  0%, 12%, 100% { transform: none; border-bottom-width: 2px; color: var(--text); }
  6% { transform: translateY(2px); border-bottom-width: 1px; color: var(--accent); }
}
.terminal {
  font: 0.8125rem/1.7 ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}
.terminal span {
  color: var(--accent);
}
.c-book {
  background:
    linear-gradient(160deg, rgb(201 169 110 / 0.1), transparent 55%),
    var(--bg-raised);
}
.c-book blockquote {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--text);
}
.c-book cite {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
@media (prefers-reduced-motion: reduce) {
  .js .c-sea svg.waves path,
  .js .keycaps kbd {
    animation: none;
  }
}

/* Signature */
.sign {
  display: block;
  margin-top: 3.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--accent);
}
.js .sign {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.8s var(--ease) 0.3s;
}
.js .sign.is-visible {
  clip-path: inset(0 0 0 0);
}

/* Shortcut help: which-key style */
.keys {
  width: min(28rem, calc(100% - 2rem));
  padding: 0;
  color: var(--text);
  background: rgb(19 19 17 / 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
}
.keys::backdrop {
  background: rgb(0 0 0 / 0.55);
  backdrop-filter: blur(4px);
}
.keys header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.keys h2 {
  font-size: 1.5rem;
}
.keys header small {
  color: var(--text-faint);
  font-size: 0.75rem;
}
.keys dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.25rem;
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  font-size: 0.875rem;
}
.keys dt {
  display: flex;
  gap: 0.25rem;
}
.keys dd {
  margin: 0;
  color: var(--text-muted);
  align-self: center;
}
.leader .keys-hint kbd:first-child,
.leader .site-header .kbd-hint {
  color: var(--accent);
  border-color: var(--accent);
}
.kbd-hint {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--text-faint);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.kbd-hint:hover {
  color: var(--text);
}
@media (hover: none) {
  .kbd-hint {
    display: none;
  }
}

@media print {
  .hero canvas,
  .progress,
  .status,
  .hello,
  .keys,
  .sign,
  #person {
    display: none !important;
  }
  .hero {
    min-height: 0;
    display: block;
  }
  .hero-inner {
    padding: 0 0 6mm;
  }
  .js .hero h1 .line > span {
    animation: none;
  }
}

/* Photo in the sea card, toned to the palette */
.c-sea .photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 60%;
  filter: grayscale(1) sepia(0.45) brightness(0.55) contrast(1.15);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
  transition: filter 0.8s var(--ease), transform 1.2s var(--ease);
}
.c-sea:hover .photo {
  filter: grayscale(0.6) sepia(0.3) brightness(0.7) contrast(1.1);
  transform: scale(1.03);
}
.c-sea > :not(.photo) {
  position: relative;
  max-width: 26rem;
}
.c-sea .credit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  font-size: 0.625rem;
  color: var(--text-faint);
  max-width: none;
}
@media (max-width: 47.99rem) {
  .c-sea .photo {
    width: 100%;
    opacity: 0.45;
  }
}
@media (min-width: 48rem) {
  .bento .c-build { grid-column: span 3; }
  .bento .c-book { grid-column: span 3; }
}

/* Writing */
.posts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.posts li {
  border-bottom: 1px solid var(--line);
}
.posts a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 3rem;
  padding: 1.75rem 0;
  text-decoration: none;
  position: relative;
}
@media (min-width: 60rem) {
  .posts a {
    grid-template-columns: 14rem minmax(0, 1fr) 2rem;
    align-items: baseline;
  }
}
.posts time {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.posts h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.875rem);
  transition: color 0.3s var(--ease), transform 0.5s var(--ease);
}
.posts p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 44rem;
}
@media (min-width: 60rem) {
  .posts p {
    grid-column: 2;
  }
}
.posts .go {
  color: var(--text-faint);
  transition: transform 0.4s var(--ease), color 0.3s var(--ease);
  justify-self: end;
}
.posts a:hover h3 {
  color: var(--accent);
  transform: translateX(0.4rem);
}
.posts a:hover .go {
  color: var(--accent);
  transform: translate(0.25rem, -0.25rem);
}
.more {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
}
.more:hover {
  color: var(--accent);
}
@media print {
  #skriver,
  #writing {
    display: none !important;
  }
}
