@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope-latin-wght.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Charis;
  src: url('/fonts/charis-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Charis;
  src: url('/fonts/charis-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Charis;
  src: url('/fonts/charis-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Sampled from official GTA 6 stills (Lucia sunset skyline, cover art).
     One rose hue. Seven roles. APCA vs fill, dark-mode polarity.
     Brand, text-strong, text-weak: Lc ≥ 75. Stroke-strong: Lc ≥ 15. */
  --brand: oklch(0.91 0.12 352);
  --text-strong: oklch(0.93 0.028 55);
  --text-weak: oklch(0.87 0.038 340);
  --stroke-strong: oklch(0.52 0.045 325);
  --stroke-weak: oklch(0.38 0.032 322);
  --fill: oklch(0.29 0.038 320);
  --background: oklch(0.205 0.028 318);
  --ring: var(--brand);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: Manrope, system-ui, sans-serif;
  --font-prose: Charis, 'Bitstream Charter', Charter, Georgia, serif;
  --text-display: clamp(1.85rem, 4vw, 2.5rem);
  --text-title: 1.25rem;
  --text-prose: 1.25rem;
  --text-body: 1.0625rem;
  --text-small: 1rem;
  --leading-body: 1.55;
  --leading-prose: 1.65;
  --leading-tight: 1.15;
  --page-max: 26rem;
  --gutter: clamp(1.25rem, 4vw, 2rem);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --brand: oklch(0.45 0.14 352);
    --text-strong: oklch(0.24 0.04 320);
    --text-weak: oklch(0.44 0.045 328);
    --stroke-strong: oklch(0.7 0.04 328);
    --stroke-weak: oklch(0.86 0.02 330);
    --fill: oklch(0.945 0.018 348);
    --background: oklch(0.975 0.012 350);
  }
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  background: var(--background);
  color: var(--text-weak);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  font-synthesis: none;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

.section-heading,
.entry-title,
.row-title,
.article-title,
.page-back,
h1,
h2,
h3 {
  color: var(--text-strong);
}

::selection {
  background: var(--brand);
  color: var(--background);
}

a {
  color: inherit;
  text-decoration: none;
}

.skip {
  position: absolute;
  top: 0.75rem;
  left: var(--gutter);
  z-index: 2;
  padding: 0.4rem 0.7rem;
  background: var(--fill);
  color: var(--text-strong);
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

.skip:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page {
  min-height: 100dvh;
  padding: 1.5rem 1.25rem 3rem;
}

.page-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
}

.reading-page {
  --page-max: 38rem;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  align-self: flex-start;
  min-height: 2.75rem;
  margin-inline-start: -0.5rem;
  padding-inline: 0.5rem;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-strong);
  transition: color 180ms var(--ease);
}

.page-back-icon {
  flex-shrink: 0;
}

.page-back:hover {
  color: var(--brand);
}

.page-back:focus-visible,
.entry-title:focus-visible,
.row:focus-visible,
.text-link:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.draft-flag {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--stroke-strong);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-weak);
}

.home {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.25rem 1.25rem 2.25rem;
}

.home-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 40rem;
  flex: 1;
  margin-inline: auto;
  text-wrap: pretty;
}

.masthead {
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.role {
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  color: var(--text-weak);
}

.section {
  margin-top: 2.75rem;
}

.section-projects {
  margin-top: 3.25rem;
}

.section-heading {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

.entries,
.rows {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
}

.entries {
  gap: 1.15rem;
  margin-top: 0.95rem;
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.entry-title {
  align-self: flex-start;
  font-size: var(--text-title);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--brand);
  text-underline-offset: 0.18em;
  transition:
    color 180ms var(--ease),
    transform 120ms var(--ease);
}

.entry-title:hover {
  color: var(--text-strong);
  text-decoration: underline;
}

.entry-title:active {
  transform: translateY(1px);
}

.entry-note {
  max-width: 36rem;
  font-size: var(--text-small);
  color: var(--text-weak);
}

.quiet {
  margin-top: 0.8rem;
  font-size: var(--text-small);
  color: var(--text-weak);
}

.rows {
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.row-title {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-strong);
  transition: color 180ms var(--ease);
}

.row:hover .row-title {
  color: var(--brand);
}

.row-date {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--text-weak);
  font-variant-numeric: tabular-nums;
}

.foot {
  margin-top: auto;
  padding-top: 3.5rem;
}

.foot-line {
  font-size: 0.875rem;
  color: var(--text-weak);
}

.text-link {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: var(--stroke-strong);
  text-underline-offset: 0.18em;
  transition:
    color 180ms var(--ease),
    text-decoration-color 180ms var(--ease);
}

.text-link:hover {
  color: var(--brand);
  text-decoration-color: var(--brand);
}

.article-header {
  padding: 2rem 0 1.5rem;
}

.article-title {
  font-size: var(--text-display);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  text-wrap: balance;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  font-size: var(--text-small);
  color: var(--text-weak);
}

.article-prose {
  font-family: var(--font-prose);
  font-size: var(--text-prose);
  font-weight: 400;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  line-height: var(--leading-prose);
  color: var(--text-weak);
  text-wrap: pretty;
}

.article-prose > * + * {
  margin-top: 0.9em;
}

.article-prose h2,
.article-prose h3 {
  margin-top: 1.8em;
  font-family: var(--font);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  color: var(--text-strong);
}

.article-prose h2 {
  font-size: 1.2em;
}

.article-prose h3 {
  font-size: 1em;
}

.article-prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.article-prose strong {
  color: var(--text-strong);
  font-weight: 700;
}

.article-prose code {
  font-size: 0.9375em;
  color: var(--text-strong);
}

.article-prose pre {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--stroke-weak);
  background: var(--fill);
  font-size: var(--text-small);
  line-height: var(--leading-body);
  overflow-x: auto;
}

.article-prose blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--stroke-strong);
  color: var(--text-weak);
}

.article-prose ul,
.article-prose ol {
  padding-left: 1.25rem;
}

.article-prose li + li {
  margin-top: 0.4rem;
}

.article-prose img,
.article-prose video {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
    gap: 0.05rem;
  }
}

@media (min-width: 640px) {
  .page {
    padding: 2rem var(--gutter) 4rem;
  }

  .home {
    padding: 5.25rem var(--gutter) 3rem;
  }

  .entry {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
  }

  .entry-title {
    padding-top: 0.12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .skip,
  .page-back,
  .entry-title,
  .row-title,
  .text-link {
    transition: none;
  }

  .entry-title:active {
    transform: none;
  }
}
