@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300..900&family=Caveat:wght@400..700&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* warm-ink dark palette, taken from the reference */
:root {
  --paper: #131110;
  --ink: #f2efe9;
  --ink-soft: #beb7aa;
  --ink-faint: #948c7e;
  --wire: #989184;
  --marker: #e8542f;
  --marker-text: #e8542f;
  --panel: #1c1916;
  --green: #79b995;
  --blue: #7ab8ff;

  --serif: "Fraunces", "Fraunces Georgia", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-alt: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --wobble-soft: 120px 20px 120px 20px / 20px 120px 20px 120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 380;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

.wrap,
.wrap-narrow {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 48px, 640px);
}

.mono {
  font-family: var(--mono);
  font-size: 0.72em;
}

::selection {
  background: var(--marker);
  color: var(--paper);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--marker);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--ink);
}

.nav-inner {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--marker-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 6px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4.2C10 1.4 22 5 31 2.6 40 0.2 50 4.4 59 2.2' fill='none' stroke='%23e8542f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 50% 45% 52% 48% / 48% 52% 48% 52%;
  text-decoration: none;
  color: var(--ink);
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.icon-link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-6deg) scale(1.06);
}

/* ---------- hero ---------- */
.stage {
  padding: 96px 0 0;
}

.hero {
  text-align: left;
}

.hero-title {
  margin: 0;
  font-size: clamp(52px, 11vw, 128px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 20, "WONK" 1;
  color: var(--marker-text);
}

.pron {
  margin: 24px 0 0;
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pron .slash {
  color: var(--marker-text);
}

.dot-sep {
  color: var(--marker-text);
  font-size: 1.2em;
  line-height: 1;
}

.role {
  color: var(--ink);
  font-weight: 500;
}

.defs {
  margin: 26px 0 0;
  max-width: 660px;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.defs li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.5;
}

.defs .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--marker-text);
  padding-top: 9px;
}

.hero-line {
  margin: 26px auto 0;
  max-width: 34ch;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
}

.cta-row {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brush-btn {
  position: relative;
  display: inline-block;
  padding: 13px 30px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  background: var(--panel);
  border: none;
  border-radius: var(--wobble-soft);
  transition: transform 0.3s var(--ease);
}

.brush-btn:hover {
  transform: translateY(-2px) rotate(-0.6deg);
}

.brush-btn::after {
  content: "";
  position: absolute;
  inset: 4px -6px -4px 6px;
  border: 1.5px solid var(--marker);
  border-radius: var(--wobble);
  pointer-events: none;
}

.brush-btn.ghost {
  background: none;
}

.brush-btn.ghost::after {
  border-color: var(--ink);
}

/* ---------- section shell ---------- */
.section {
  padding: 84px 0;
}

.rule {
  border: 0;
  border-top: 1.5px solid var(--ink);
  margin: 0;
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
}

.sec-label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.sec-line {
  flex: 1;
  height: 8px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.4C30 2.2 60 6.6 92 3.4 124 0.2 160 6 199 3' fill='none' stroke='%23f2efe9' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.sec-title {
  margin: 0 0 20px;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

/* ---------- stack ---------- */
.stack-card {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: var(--wobble-alt);
  padding: 30px 32px 34px;
  transform: rotate(-0.6deg);
  background: var(--panel);
}

.stack-title {
  margin: 0 0 20px;
  font-family: var(--hand);
  font-size: 32px;
  line-height: 1.1;
  color: var(--marker-text);
}

.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack-list li {
  border: 1.5px solid var(--wire);
  border-radius: var(--wobble-soft);
  padding: 7px 16px;
  font-size: 15.5px;
  color: var(--ink);
}

/* ---------- open source note ---------- */
.open-note {
  max-width: 58ch;
  margin-top: 46px;
}

.open-note p {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.5;
}

.open-note p:last-of-type {
  margin-bottom: 30px;
}

.open-note a {
  color: var(--marker-text);
}

/* ---------- work ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.feat {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: var(--wobble-alt);
  padding: 26px 28px 28px;
  background: var(--paper);
  text-decoration: none;
  display: block;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.feat:nth-child(2n) {
  border-radius: var(--wobble);
}

.feat:hover {
  transform: translateY(-3px) rotate(-0.35deg);
  box-shadow: 7px 8px 0 -3.5px var(--panel), 7px 8px 0 -2.2px var(--ink);
}

.feat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.feat-name {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.feat-desc {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 44ch;
}

.feat-arrow {
  color: var(--wire);
  flex: 0 0 auto;
  transition:
    transform 0.3s var(--ease),
    color 0.3s var(--ease);
}

.feat:hover .feat-arrow {
  transform: translate(3px, -3px);
  color: var(--ink);
}

/* ---------- footer ---------- */
.foot {
  margin-top: 20px;
  padding: 52px 0 60px;
  border-top: 1.5px solid var(--ink);
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.foot-link {
  text-decoration: none;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.foot-link:hover {
  color: var(--ink);
}

.foot-copy {
  color: var(--ink-faint);
  font-size: 12px;
}

/* ---------- contact page ---------- */
.page {
  padding: 92px 0 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 34px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--ink);
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.page-sub {
  margin: 0 0 40px;
  font-size: 19px;
  color: var(--ink-soft);
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.contact-item {
  border: 1.5px solid var(--ink);
  border-radius: var(--wobble-alt);
  background: var(--paper);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.contact-item:nth-child(2n) {
  border-radius: var(--wobble);
}

.contact-item:hover {
  transform: translateY(-2px) rotate(-0.3deg);
  box-shadow: 6px 7px 0 -3.5px var(--panel), 6px 7px 0 -2.2px var(--ink);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  text-decoration: none;
}

.contact-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50% 45% 52% 48% / 48% 52% 48% 52%;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--marker-text);
}

.contact-text {
  min-width: 0;
}

.contact-label {
  display: block;
  font-size: 18px;
  font-weight: 500;
}

.contact-handle {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.contact-item .feat-arrow {
  margin-left: auto;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .feat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 17px;
  }
  .wrap,
  .wrap-narrow,
  .nav-inner {
    width: min(100% - 34px, 1120px);
  }
  .stage {
    padding-top: 62px;
  }
  .page {
    padding-top: 64px;
  }
  .section {
    padding: 60px 0;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-link {
    font-size: 14px;
  }
  .stack-card {
    transform: none;
    padding: 24px;
  }
  .hero-line {
    font-size: 19px;
  }
  .foot-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
