@font-face {
  font-family: 'Geist Pixel Square';
  src: url('/assets/fonts/GeistPixel-Square.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0c0c0c;
  --text: #e0e0e0;
  --text-bright: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.45);
  --text-faint: rgba(255, 255, 255, 0.2);
  --rule: rgba(255, 255, 255, 0.06);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.025) 0%, transparent 70%);
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--text-bright);
  text-decoration-color: var(--text-bright);
}

.mark {
  padding: 2.5rem 0 0;
  padding-left: max(2rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mark a.logo {
  color: var(--text-bright);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
}

.mark a.logo:hover {
  background: rgba(255, 255, 255, 0.09);
}

.mark svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.08));
}

.mark .series {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 400;
}

.mark .series:hover {
  color: var(--text-bright);
}

main {
  max-width: 600px;
  padding: 2.5rem 2rem 5rem;
  padding-left: max(2rem, env(safe-area-inset-left));
  padding-right: max(2rem, env(safe-area-inset-right));
  padding-bottom: max(5rem, calc(2rem + env(safe-area-inset-bottom)));
  position: relative;
  z-index: 10;
}

.back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  text-decoration: none;
}

.back:hover {
  color: var(--text-bright);
}

.essay-header {
  margin-bottom: 2.5rem;
}

.essay-header h1 {
  font-family: 'Geist Pixel Square', monospace;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: normal;
  color: var(--text-bright);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.essay-header time {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.essay-header .essay-meta {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.essay-header .today {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 400;
  margin-right: 0.4rem;
}

.essay p {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.25rem;
  max-width: 540px;
}

.essay h2 {
  font-family: 'Geist Pixel Square', monospace;
  font-size: 1rem;
  font-weight: normal;
  color: var(--text-bright);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.essay strong {
  font-weight: 500;
  color: var(--text-bright);
}

.essay ul {
  margin: 0 0 1.4rem 1.1rem;
  max-width: 540px;
}

.essay li {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.shipped {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.shipped h2 {
  font-family: 'Geist Pixel Square', monospace;
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.shipped ol {
  list-style: none;
}

.shipped li {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.shipped li a {
  font-size: 0.95rem;
  font-weight: 400;
}

.shipped .why {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.archive-list {
  list-style: none;
}

.archive-list li {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.archive-list a {
  font-size: 0.95rem;
  font-weight: 400;
}

.archive-list time {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.earlier {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.earlier h2 {
  font-family: 'Geist Pixel Square', monospace;
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.earlier-list {
  list-style: none;
}

.earlier-list li {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.earlier-list a {
  font-size: 0.95rem;
  font-weight: 400;
}

.earlier-list time {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.essay-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.essay-footer p {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.essay-footer a {
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .mark {
    padding: 1.5rem 0 0 1.25rem;
  }

  main {
    padding: 2rem 1.25rem 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}

@media (prefers-contrast: more) {
  body::before { display: none; }
  :root {
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --text-faint: rgba(255, 255, 255, 0.5);
  }
  .essay-header h1, .essay h2, .shipped h2, .earlier h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
  }
}
