:root {
  --night: #16101a;
  --dusk: #1f1824;
  --wick: #372c3d;
  --underline: #5b4b61;
  --ash: #a69daa;
  --bone: #efe7dc;
  --flame: #f4b860;
  --ember: #c8703f;
  --violet: #6e4a9e;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --text: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --date-col: 9.5rem;
  --rail-gap: 3rem;
  --ease-out: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 17px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -48px;
  background: var(--flame); color: var(--night); padding: 8px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none; z-index: 30;
}
.skip:focus { top: 12px; }

/* Backdrop for the whole page: a deep aubergine field with slow, faint haze and fine grain. */
.backdrop {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background: linear-gradient(170deg, #1a1320 0%, #16101a 38%, #130e17 72%, #110c14 100%);
}
.backdrop::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(38% 32% at 82% 16%, rgba(110, 74, 158, .16), transparent 70%),
    radial-gradient(34% 30% at 12% 62%, rgba(200, 112, 63, .08), transparent 70%),
    radial-gradient(40% 34% at 72% 88%, rgba(84, 58, 132, .14), transparent 70%);
  animation: drift 48s ease-in-out infinite alternate;
}
.backdrop::after {
  content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-4%, 3%, 0) scale(1.06); }
}

/* The candle glow over the hero, lit once when the page opens. */
.light {
  position: absolute; inset: 0 0 auto 0; height: 110vh; pointer-events: none; z-index: -1;
  background:
    radial-gradient(52vmax 44vmax at 14% -4%, rgba(244, 184, 96, 0.15), rgba(200, 112, 63, 0.07) 38%, transparent 68%),
    radial-gradient(30vmax 26vmax at 6% 8%, rgba(244, 184, 96, 0.08), transparent 70%);
  animation: kindle 2.4s var(--ease-out) both;
}
@keyframes kindle {
  0% { opacity: 0; }
  38% { opacity: .75; }
  48% { opacity: .55; }
  100% { opacity: 1; }
}

/* A faint light that follows the pointer on desktop. */
.lantern {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), rgba(244, 184, 96, .07), transparent 62%);
  transition: opacity .8s ease;
}
.lantern.on { opacity: 1; }

.wrap {
  position: relative;
  max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter);
}

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.top.scrolled {
  background: rgba(22, 16, 26, .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(55, 44, 61, .7);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 16px/1 var(--display); letter-spacing: 0.01em; text-decoration: none;
}
.mark::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--flame); box-shadow: 0 0 14px 3px rgba(244, 184, 96, .45);
}
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.top nav a {
  color: var(--ash); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0;
  transition: color .25s ease;
}
.top nav a:hover, .top nav a[aria-current="true"] { color: var(--bone); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 248px; column-gap: 56px; align-items: start;
  padding: clamp(56px, 11vh, 130px) 0 clamp(48px, 7vh, 88px);
}
.hero-text { min-width: 0; }
.hero h1 {
  margin: 0;
  font: 300 clamp(50px, 10.4vw, 132px)/0.94 var(--display);
  letter-spacing: -0.045em;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero h1 .line > span { display: block; }
.hero h1 .line + .line > span { padding-left: 0.62em; color: #e3d8ca; }
.lede {
  max-width: 31em; margin: clamp(32px, 5vw, 52px) 0 0;
  font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5;
}
.where { margin: 14px 0 0; color: var(--ash); font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--flame); color: var(--night); font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(244, 184, 96, .55);
  transition: box-shadow .35s ease, transform .35s var(--ease-out);
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -14px rgba(244, 184, 96, .75); }
.btn:hover::after { transform: translateX(120%); transition: transform .9s var(--ease-out); }
.textlink {
  font-weight: 500; text-decoration: underline; text-decoration-color: var(--underline);
  text-decoration-thickness: 1px; text-underline-offset: 5px; padding: 12px 0;
  transition: color .25s ease, text-decoration-color .25s ease;
}
.textlink:hover { color: var(--flame); text-decoration-color: currentColor; }
.now {
  margin: 56px 0 0; max-width: 31em; color: var(--ash); font-size: 15px;
  padding-top: 18px; border-top: 1px solid var(--wick);
}
.now a { color: var(--bone); }

.portrait {
  margin: 18px 0 0; position: relative; perspective: 900px;
}
.portrait .frame {
  border-radius: 22px; overflow: hidden; border: 1px solid rgba(239, 231, 220, .08);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 20px 70px -30px rgba(110, 74, 158, .55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .6s var(--ease-out);
  will-change: transform;
}
.portrait img { width: 100%; filter: saturate(.92) contrast(1.03); }
.portrait::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 16px; height: 40px; z-index: -1;
  background: radial-gradient(closest-side, rgba(244, 184, 96, .22), transparent); filter: blur(8px);
}
.portrait figcaption { margin-top: 16px; font-size: 14px; color: var(--ash); }

/* One entrance: the name rises into place while the candle is lit. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line > span { animation: rise 1.25s var(--ease-out) both; }
  .hero h1 .line + .line > span { animation-delay: .12s; }
  .hero .lede, .hero .where, .hero .actions, .hero .now { animation: settle 1s var(--ease-out) both; }
  .hero .lede { animation-delay: .45s; }
  .hero .where { animation-delay: .55s; }
  .hero .actions { animation-delay: .65s; }
  .hero .now { animation-delay: .8s; }
  .portrait { animation: settle 1.4s var(--ease-out) .3s both; }
}
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Section headings */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section > h2, .contact h2 {
  margin: 0 0 clamp(40px, 6vw, 72px);
  font: 400 clamp(26px, 3.4vw, 36px)/1.15 var(--display); letter-spacing: -0.02em;
}
.section > h2 small {
  display: block; margin-top: 10px;
  font: 400 16px/1.5 var(--text); letter-spacing: 0; color: var(--ash);
}

/* Timeline: the flame burns down the rail as you read. */
.tl { --rail-x: calc(var(--date-col) + var(--rail-gap) / 2); position: relative; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 14px; bottom: 0; left: var(--rail-x); width: 1px;
  background: linear-gradient(to bottom, var(--wick), var(--wick) 88%, transparent);
}
.burn {
  position: absolute; top: 14px; left: var(--rail-x); width: 1px; height: var(--burn, 0px);
  background: linear-gradient(to bottom, rgba(244, 184, 96, .9), rgba(214, 132, 72, .75) 20%, rgba(214, 132, 72, .7) 75%, var(--flame));
  box-shadow: 0 0 10px rgba(244, 184, 96, .35);
  pointer-events: none; transition: height .18s linear;
}
.burn::after {
  content: ""; position: absolute; bottom: -3px; left: 50%; width: 5px; height: 5px; border-radius: 50%;
  transform: translateX(-50%); background: var(--flame);
  box-shadow: 0 0 10px 3px rgba(244, 184, 96, .6), 0 0 26px 8px rgba(244, 184, 96, .22);
}
.entry {
  display: grid; grid-template-columns: var(--date-col) minmax(0, 1fr); column-gap: var(--rail-gap);
  padding-bottom: clamp(72px, 10vw, 128px);
}
.entry:last-child { padding-bottom: 8px; }
.when { padding-top: 6px; text-align: right; }
.when time { display: block; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.when span { display: block; color: var(--ash); font-size: 14px; margin-top: 2px; }
.body { position: relative; min-width: 0; }
.body::before, .when::before {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--night); border: 1px solid var(--ash);
  transition: background-color .5s ease, border-color .5s ease, box-shadow .8s ease;
}
.body::before { top: 14px; left: calc(var(--rail-gap) / -2); }
.when::before { display: none; }
.entry.reached .body::before, .entry.reached .when::before {
  background: var(--flame); border-color: var(--flame);
  box-shadow: 0 0 0 4px rgba(244, 184, 96, .1), 0 0 18px 4px rgba(244, 184, 96, .3);
}
.body h3 {
  margin: 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font: 400 clamp(30px, 4.2vw, 48px)/1.05 var(--display); letter-spacing: -0.03em;
}
.body h3 img { width: 44px; height: 44px; border-radius: 11px; }
.role { margin: 12px 0 0; color: var(--ash); font-size: 16px; }
.body p.what { margin: 20px 0 0; max-width: 34em; font-size: 18px; }
.proof { margin: 20px 0 0; font: 300 clamp(20px, 2.2vw, 24px)/1.3 var(--display); letter-spacing: -0.01em; }
.stack { margin: 14px 0 0; color: var(--ash); font-size: 15px; max-width: 40em; }
.links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 14px; }
.status {
  display: inline-block; margin-left: 2px; padding: 3px 10px; border-radius: 999px;
  font: 500 13px/1.4 var(--text); letter-spacing: 0; color: var(--ash);
  border: 1px solid var(--wick); vertical-align: middle;
}

/* Media */
.media { margin: 36px 0 0; max-width: 820px; }
.media.feature img { border-radius: 16px; width: 100%; background: var(--dusk); }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 540px; margin-top: 14px; }
.phones img {
  border-radius: 14px; border: 1px solid var(--wick); background: var(--dusk);
  transition: transform .6s var(--ease-out), border-color .4s ease;
}
.phones:hover img { transform: translateY(4px); }
.phones img:hover { transform: translateY(-6px); border-color: var(--underline); }
.browser {
  border: 1px solid var(--wick); border-radius: 12px; overflow: hidden; background: var(--dusk);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .8);
  transition: border-color .4s ease, box-shadow .6s ease;
}
.browser:hover { border-color: var(--underline); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(244, 184, 96, .05); }
.browser figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 14px; font-size: 13px; color: var(--ash); border-bottom: 1px solid var(--wick);
}
.browser figcaption span { opacity: 0; transition: opacity .4s ease; }
.browser:hover figcaption span { opacity: 1; }
.browser .viewport { aspect-ratio: 16 / 10; overflow: hidden; }
.browser .viewport img {
  width: 100%; background: var(--dusk); transform: translateY(var(--pan, 0px));
  transition: transform var(--pan-time, 1.2s) cubic-bezier(.45, .05, .25, 1);
}

/* From the blog */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-bottom: 28px; }
.post-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; min-width: 0; }
.post-card img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: var(--dusk);
  border: 1px solid rgba(239, 231, 220, .06); transition: transform .8s var(--ease-out), border-color .4s ease;
}
.post-card:hover img { transform: translateY(-4px); border-color: var(--underline); }
.post-meta { margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--flame); }
.post-meta time { color: var(--ash); }
.post-title { font: 400 19px/1.3 var(--display); letter-spacing: -0.02em; transition: color .25s ease; }
.post-card:hover .post-title { color: var(--flame); }
.post-empty { grid-column: 1 / -1; margin: 0; color: var(--ash); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); }
.about-grid p { margin: 0 0 18px; max-width: 33em; font-size: 18px; }
.crafts { margin: 0; }
.crafts div { padding: 18px 0; border-top: 1px solid var(--wick); transition: padding-left .5s var(--ease-out); position: relative; }
.crafts div:last-child { border-bottom: 1px solid var(--wick); }
.crafts div::before {
  content: ""; position: absolute; left: 0; top: 29px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--flame); opacity: 0; transform: scale(.4); transition: opacity .4s ease, transform .5s var(--ease-out);
}
.crafts div:hover { padding-left: 20px; }
.crafts div:hover::before { opacity: 1; transform: none; }
.crafts dt { font: 400 19px/1.3 var(--display); letter-spacing: -0.01em; }
.crafts dd { margin: 6px 0 0; color: var(--ash); font-size: 16px; }
.background { list-style: none; padding: 0; margin: 48px 0 0; }
.background li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 16px; padding: 10px 0; font-size: 16px; }
.background time { color: var(--ash); font-variant-numeric: tabular-nums; }
.background a { color: var(--bone); }

/* Contact */
.contact { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 110px); }
.contact h2 { margin-bottom: 20px; }
.contact p { margin: 0; color: var(--ash); max-width: 32em; }
.mail {
  display: inline-block; margin-top: 28px;
  font: 300 clamp(21px, 5vw, 58px)/1.1 var(--display); letter-spacing: -0.035em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat,
              linear-gradient(var(--underline), var(--underline)) 0 100% / 100% 1px no-repeat;
  padding-bottom: .12em;
  transition: color .3s ease, background-size .7s var(--ease-out);
}
.mail:hover { color: var(--flame); background-size: 100% 1px, 100% 1px; }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 48px;
  padding: 28px 0 44px; border-top: 1px solid var(--wick); color: var(--ash); font-size: 14px;
}
.foot p { margin: 0; max-width: 34em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav span { color: var(--bone); }
.foot nav a { color: var(--ash); padding: 4px 0; transition: color .25s ease; }
.foot nav a:hover { color: var(--bone); }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 104px; margin: 0 0 32px; }
  .portrait .frame { border-radius: 18px; }
  .portrait figcaption, .portrait::after { display: none; }
}

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .posts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --date-col: 0px; --rail-gap: 28px; }
  .tl { --rail-x: 5px; }
  .timeline::before, .burn { top: 10px; }
  .entry { grid-template-columns: 1fr; padding-left: 28px; }
  .when { position: relative; text-align: left; padding-top: 0; margin-bottom: 12px; display: flex; gap: 10px; align-items: baseline; }
  .when span { margin-top: 0; }
  .body::before { display: none; }
  .when::before { display: block; top: 0.8em; left: -22.5px; }
  .hero h1 .line + .line > span { padding-left: 0; }
  .top nav a:first-child { display: none; }
  .phones { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .light, .backdrop::before { animation: none; }
  .lantern { display: none; }
  *, *::before, *::after { transition: none !important; }
}
