/* Esben Eickhardt: dark, minimal, one accent. */

@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #09090b;
  --bg-2: #0e0e11;
  --card: #111114;
  --line: #1d1d22;
  --line-2: #2a2a31;
  --text: #ededf0;
  --muted: #8d8d97;
  --dim: #5f5f69;
  --accent: #c8f26a;
  --accent-ink: #0b0d05;
  --radius: 16px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--mono); font-feature-settings: normal; }
.dim { color: var(--dim); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: -.02em; color: var(--accent);
  transition: border-color .2s, transform .2s;
}
.brand:hover { border-color: var(--accent); transform: rotate(-6deg); }
.nav nav { display: flex; gap: 4px; }
.nav nav a { color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; }
.nav nav a:hover, .nav nav a.on { color: var(--text); background: var(--bg-2); }

/* ---- hero ---- */
.hero { position: relative; padding: 120px 0 96px; overflow: hidden; }
.hero::before {
  /* faint grid, fading out */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, #000 0%, transparent 75%);
  opacity: .55;
}
.hero::after {
  /* the glow */
  content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; left: -180px; top: -320px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); color: var(--muted); letter-spacing: .02em; margin-bottom: 28px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
h1 {
  font-size: clamp(44px, 8.2vw, 104px);
  line-height: .98; font-weight: 650; letter-spacing: -.045em;
  background: linear-gradient(180deg, #fff 30%, #a9a9b3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.phd { color: var(--dim); -webkit-text-fill-color: var(--dim); font-weight: 400; }
.lede { max-width: 680px; margin-top: 28px; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--muted); letter-spacing: -.01em; }
.lede p + p { margin-top: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2);
  font-size: 15px; font-weight: 550; letter-spacing: -.01em;
  transition: transform .2s, border-color .2s, background .2s;
}
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); border-color: var(--dim); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #d6f78a; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 88px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 24px 24px 0 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dt { font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.facts dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---- sections ---- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
.label { font: 500 13px/1.6 var(--mono); color: var(--accent); text-transform: lowercase; letter-spacing: .02em; padding-top: 4px; }
.label::before { content: "// "; color: var(--dim); }
.prose { max-width: 680px; }
.prose p { color: var(--muted); font-size: 18px; line-height: 1.7; }
.prose p + p { margin-top: 18px; }
.prose p:first-child { color: var(--text); }

/* ---- timeline ---- */
.timeline { position: relative; }
.job { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.job:first-child { padding-top: 0; }
.job:last-child { border-bottom: 0; }
.when { color: var(--dim); font-size: 13px; padding-top: 5px; white-space: nowrap; }
.job h3 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.at { display: block; color: var(--muted); font-weight: 400; font-size: 16px; margin-top: 2px; }
.where { color: var(--dim); font-size: 14px; margin-top: 2px; }
.points { margin-top: 14px; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.points li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 1px; background: var(--dim); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tags li { font: 500 12px/1 var(--mono); color: var(--muted); padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 999px; }

/* ---- projects ---- */
.head { margin-bottom: 48px; }
.featured { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s, transform .3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.shot { display: block; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--bg-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .4s; filter: saturate(.9); }
.card:hover .shot img { transform: scale(1.035); filter: saturate(1.05); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.card-body > p:not(.links) { color: var(--muted); margin-top: 8px; font-size: 15.5px; line-height: 1.6; }
.links { display: flex; gap: 18px; margin-top: auto; padding-top: 20px; font-size: 14px; font-weight: 550; }
.links a, .mini-link { color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.links a:hover, .mini-link:hover { color: var(--accent); border-color: var(--accent); }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.mini-card .card-body { padding: 20px; }
.mini-card h3 { font-size: 18px; }
.mini-card .card-body > p:not(.links) { font-size: 14.5px; }
.mini-card .tags { margin-top: 14px; }
.mini-card .links { padding-top: 16px; }

/* ---- toolbox ---- */
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s; }
.tool:hover { border-color: var(--line-2); }
.tool h3 { font: 500 13px/1.6 var(--mono); color: var(--text); }
.tool .tags { margin-top: 14px; }
.tool .tags li { font-size: 12.5px; padding: 7px 10px; line-height: 1.25; }

/* ---- education ---- */
.bg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 48px; }
.bg h3 { font: 500 13px/1.6 var(--mono); color: var(--text); margin-bottom: 12px; }
.list { display: grid; gap: 14px; }
.list li { display: flex; flex-direction: column; gap: 2px; font-size: 15.5px; line-height: 1.5; }
.list .mono { font-size: 12.5px; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.foot a:hover { color: var(--accent); }

/* ---- motion ---- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pulse { animation: none; }
  .card, .shot img, .btn, .brand { transition: none; }
}

/* ---- smaller screens ---- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .more { grid-template-columns: repeat(2, 1fr); }
  .tools { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 24px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 72px 0 64px; }
  .facts { margin-top: 56px; }
  .facts dt { font-size: 26px; }
  .section { padding: 64px 0; }
  .featured, .more, .bg, .tools { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .nav nav a { padding: 8px 9px; }
  .card-body { padding: 20px; }
}

@media print {
  .js .reveal { opacity: 1; transform: none; }
  .nav, .hero::before, .hero::after { display: none; }
}
