@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --bg: #0d0d0d;
  --white: #f5f5f5;
  --grey: #777777;
  --grey-dim: #4a4a4a;
  --grey-hover: #bdbdbd;
  --link-hover: #FF513D;
  --divider: #1e1e1e;
  --topbar-h: 180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(245, 245, 245, 0.04) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: -1px -1px;
  background-attachment: fixed;
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  letter-spacing: -0.035em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.layout {
  display: flex;
  align-items: flex-start;
}

/* ---------- Fixed left column (logo + nav + footer) ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 280px;
  min-width: 280px;
  height: 100vh;
  overflow-y: auto;
  padding: 84px 32px 40px 86px;
  display: flex;
  flex-direction: column;
}

.logo {
  font-family: 'Press Start 2P', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-transform: uppercase;
  margin-bottom: 64px;
}

.logo a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.18s ease;
}

.logo a:hover {
  color: var(--link-hover);
}

nav {
  margin-bottom: 8px;
}

.section {
  margin-bottom: 36px;
}

.section-title {
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  color: var(--grey);
  margin-bottom: 14px;
}

.section-title a {
  color: var(--grey);
  text-decoration: none;
  transition: color 0.18s ease;
}

.section-title a:hover {
  color: var(--link-hover);
}

.section-title a.active {
  color: var(--white);
}

.placeholder {
  color: var(--grey-dim);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: -0.035em;
}

.sidebar footer {
  display: flex;
  gap: 20px;
  align-items: center;
}

.sidebar footer a {
  color: var(--grey);
  display: inline-flex;
  transition: color 0.18s ease;
}

.sidebar footer a:hover {
  color: var(--link-hover);
}

.sidebar footer svg {
  width: 19px;
  height: 19px;
  display: block;
}

/* ---------- Right content pane ---------- */
.content {
  flex: 1;
  min-width: 0;
  /* top padding aligns the first content line with the nav's first item
     (sidebar top padding 84 + logo height ~42 + logo margin-bottom 64). */
  padding: 190px 86px 120px 64px;
  scroll-margin-top: 24px;
}

.block {
  scroll-margin-top: 24px;
  padding-bottom: 72px;
  margin-bottom: 72px;
  border-bottom: 1px solid var(--divider);
}

.block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.block-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  margin-bottom: 24px;
}

.block-title .title-icon {
  width: 16px;
  height: 16px;
  fill: var(--grey);
  flex-shrink: 0;
  transform: translateY(-1.5px);
  display: none; /* TEMP: hiding section icons to evaluate */
}

.home-note {
  color: var(--grey);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: -0.035em;
}

.about-text {
  font-weight: 400;
  font-size: 19px;
  line-height: 1.7;
  letter-spacing: -0.035em;
  color: var(--white);
  margin-bottom: 18px;
  max-width: 760px;
}

.about-text a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

.about-text a:hover {
  color: var(--link-hover);
}

/* ---------- Read: list of essays ---------- */
.read-list {
  list-style: none;
}

.read-list li {
  margin-bottom: 27.5px;
}

.read-list a {
  text-decoration: none;
  color: var(--white);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.035em;
  transition: color 0.18s ease;
}

.read-list a:hover {
  color: var(--link-hover);
}

.read-list .meta {
  display: block;
  margin-top: 9px;
  font-size: 13px;
  font-weight: 300;
  color: var(--grey);
  letter-spacing: -0.035em;
}

/* ---------- Standalone essay page ---------- */
/* Fallback (no JS): plain left-aligned reading column. */
.article-page {
  max-width: 760px;
  padding: 0 86px 120px;
}

/* With the injected nav: same layout as the homepage content pane
   (left-aligned, identical padding) so navigating home <-> article doesn't jump. */
.content--article .article-inner {
  max-width: 760px;
}

.back-link {
  display: inline-block;
  color: var(--grey);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: -0.035em;
  margin-bottom: 44px;
  transition: color 0.18s ease;
}

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

article .eyebrow {
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  margin-bottom: 18px;
}

article h2 {
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--white);
  margin-bottom: 36px;
}

article h3 {
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.035em;
  color: var(--white);
  margin: 44px 0 8px;
}

article .part-label {
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  margin-top: 48px;
}

article p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.035em;
  color: #d6d6d6;
  margin-bottom: 22px;
}

article p.lead {
  color: var(--grey);
  font-style: italic;
}

article p a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

article p a:hover {
  color: var(--link-hover);
}

article .date {
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 32px;
  letter-spacing: -0.035em;
}

article .source-note {
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 32px;
  letter-spacing: -0.035em;
}

article .source-note a {
  color: var(--grey);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

article .source-note a:hover {
  color: var(--link-hover);
}

article h4 {
  font-weight: 400;
  font-size: 16px;
  letter-spacing: -0.035em;
  color: var(--white);
  margin: 32px 0 6px;
}

article ul {
  margin: 0 0 22px;
  padding-left: 0;
  list-style: none;
}

article ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.035em;
  color: #d6d6d6;
}

article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--grey);
}

article strong {
  font-weight: 400;
  color: var(--white);
}

article blockquote {
  margin: 0 0 22px;
  padding-left: 20px;
  border-left: 2px solid var(--grey-dim);
  color: var(--grey);
  font-style: italic;
}

article blockquote p {
  color: var(--grey);
  margin-bottom: 12px;
}

article blockquote p:last-child {
  margin-bottom: 0;
}

article blockquote .attribution {
  font-style: normal;
  font-size: 13px;
  color: var(--grey);
  margin-top: 10px;
}

article .references {
  margin-top: 12px;
}

article .references p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--grey);
  margin-bottom: 10px;
}

article .quote-source {
  font-weight: 400;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin-bottom: 8px;
}

article figure {
  margin: 28px 0;
}

/* Small figure floated to the right; body text wraps around it. */
article figure.figure-right {
  float: right;
  width: 336px;
  max-width: 50%;
  margin: 6px 0 18px 32px;
}

article figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

article figcaption {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  line-height: 1.6;
  margin-top: 10px;
}

article figcaption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

article figcaption a:hover {
  color: var(--link-hover);
}

article .img-placeholder {
  border: 1px solid var(--grey-dim);
  border-radius: 2px;
  padding: 40px 24px;
  text-align: center;
  color: var(--grey-dim);
  font-size: 13px;
  letter-spacing: -0.035em;
  margin: 28px 0 8px;
}

article .caption {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  line-height: 1.6;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--grey-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 48px 32px 24px;
  }
  .content { padding: 8px 32px 64px; max-width: 100%; }
  .article-page { padding: 0 32px 64px; max-width: 100%; }
  article figure.figure-right { float: none; width: 100%; max-width: 100%; margin: 28px 0; }
}
