/* Open Anonymity Landing Page Styles */
/* Minimal, lightweight styles matching v2 design */

/* Google Fonts - Single source for all pages */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@200..900&family=Domine:wght@400..700&family=Cormorant:ital,wght@0,300..700;1,300..700&family=Forum&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Gentium+Plus:ital,wght@0,400;0,700;1,400;1,700&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Fira+Code:wght@300..700&display=swap');



/* CSS Variables - Design Tokens */
:root {
  /* Colors - now using hex codes for easier editing! */
  /* Try: #cbd8d4, #75988d, #aac0b9, or any hex color you like */
  --background: #C6D4D0;        /* Current: soft green-gray */
  --background-hover: #ebeae5;
  --foreground: #000000;
  --muted: #e5e4dc;
  --muted-foreground: #686868;
  --link: #595959;
  --button: #d9d8d3;
  --button-hover: #c4c3bb;
  --button-foreground: #403e37;
  --border: #403e37;
  --divider: #686868;
  --card: #ffffff;
  --card-foreground: #000000;

  /* Typography - Font Families */
  /* Available fonts - add new fonts here */
  --font-source-sans: "Source Sans 3", "Source Sans 3 Fallback", system-ui, sans-serif;
  --font-domine: "Domine", "Domine Fallback", Georgia, serif;
  --font-forum: "Forum", Georgia, serif;
  --font-signifier: "Signifier", "Signifier Fallback", Georgia, serif;
  --font-pt-serif: "PT Serif", Georgia, serif;
  --font-cormorant: "Cormorant", Georgia, serif;  /* center for ai safety */
  --font-gentium-plus: "Gentium Plus", Georgia, serif;
  --font-garamond: "Adobe Garamond Pro", "EB Garamond", Garamond, Georgia, serif;
  --font-newsreader: "Newsreader", Georgia, serif;

  --font-system-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-anonymous-pro: "Anonymous Pro", var(--font-system-mono);
  --font-fira-code: "Fira Code", var(--font-system-mono);

  /* Active font selection - change these to swap fonts! */
  --font-serif-title: var(--font-garamond);  /* elegant display serif for headings */
  --font-serif-body: var(--font-newsreader);      /* readable serif for body text */
  --font-mono: var(--font-fira-code);

  /* Semantic assignments */
  --font-body: var(--font-mono);
  --font-heading: var(--font-serif-title);

  /* Border radius */
  --radius: 0.5rem;
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.25rem;
}

/* Font Faces - Using Google Fonts CDN */
/* Fallback fonts with size adjustments for better FOUT handling */
@font-face {
  font-family: "Source Sans 3 Fallback";
  src: local("Arial");
  ascent-override: 109.21%;
  descent-override: 42.66%;
  size-adjust: 93.76%;
}

@font-face {
  font-family: "Domine Fallback";
  src: local("Georgia");
  ascent-override: 100%;
  descent-override: 25%;
  size-adjust: 100%;
}

@font-face {
  font-family: "Signifier Fallback";
  src: local("Times New Roman");
  ascent-override: 105.92%;
  descent-override: 31.72%;
  size-adjust: 93.93%;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.625;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem);
}

/* Main Container */
.page-container {
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}

p {
  margin-bottom: 0;
}

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

/* Selection */
::selection {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Header */
header {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-title a {
  outline: none;
}

.site-title a:focus-visible {
  outline: 2px solid rgba(var(--foreground), 0.5);
  outline-offset: 2px;
}

/* Navigation */
nav {
  display: flex;
  gap: 1.5rem;
  font-size: 15px;
}

nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.2s ease;
  letter-spacing: 0.02em;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background-color: var(--foreground);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
  color: var(--foreground);
}

nav a:hover::after {
  width: 100%;
}

nav a:active {
  opacity: 0.7;
}

nav a:focus-visible {
  outline: 1px solid rgba(0, 0, 0, 0.3);
  outline-offset: 4px;
}

/* Sections */
section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Section image */
.section-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

/* Section content (markdown-rendered) */
.section-content {
  line-height: 1.625;
}

.section-content p {
  margin-bottom: 1rem;
}

.section-content p:last-child {
  margin-bottom: 0;
}

.section-content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(0, 0, 0, 0.15);
  transition: text-decoration-color 0.15s ease;
}

.section-content a:hover {
  text-decoration-color: rgba(0, 0, 0, 0.6);
}

.section-content ul,
.section-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.section-content li {
  margin-top: 1.5rem;
}

.section-content strong {
  font-weight: 550;
}

/* Links in Content */
.text-link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(89, 89, 89, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-link:hover {
  color: var(--foreground);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--foreground);
}

/* Timeline Component */
.timeline-container {
  padding-left: 0.5rem;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-left: 1px solid var(--divider);
  padding: 1rem 0;
}

/* Gradient fades at top and bottom */
.timeline::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 1.5rem;
  background: linear-gradient(to top, transparent, var(--background));
}

.timeline::after {
  content: '';
  position: absolute;
  left: -1px;
  bottom: 0;
  width: 1px;
  height: 1.5rem;
  background: linear-gradient(to bottom, transparent, var(--background));
}

/* Timeline Entry */
.timeline-entry {
  position: relative;
  margin-left: 1.5rem;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  font-size: 12px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
}

/* Timeline dot */
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background-color: var(--foreground);
  outline: 2px solid var(--background);
}

/* Variants */
.timeline-entry.default {
  gap: 0.25rem;
}

.timeline-entry.default:hover {
  background-color: var(--background-hover);
}

.timeline-entry.highlight,
.timeline-entry.soft {
  gap: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  box-shadow: 3px 3px 0px var(--foreground);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-entry.highlight:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--foreground);
}

.timeline-entry.soft {
  border-color: #D4D3CB;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 3px 3px 0px rgba(64, 62, 55, 0.35);
}

.timeline-entry.soft:hover {
  border-color: #C0BDAD;
  background-color: rgb(255, 255, 255);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px rgba(64, 62, 55, 0.4);
}

/* Adjust dot position for card variants */
.timeline-entry.highlight::before,
.timeline-entry.soft::before {
  top: 7px;
}

/* Timeline Entry Content */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 11px;
}

.timeline-entry.default .timeline-header {
  font-size: 12px;
}

.timeline-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-date {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--muted-foreground);
}

.timeline-summary {
  color: var(--muted-foreground);
  font-size: 11px;
  line-height: 1.4;
}

.timeline-entry.default .timeline-summary {
  font-size: 12px;
  line-height: 1.625;
}

/* Pi symbol formatting */
.pi-symbol {
  font-family: var(--font-heading);
}

.pi-symbol sub {
  font-family: var(--font-mono);
  letter-spacing: -0.05em;
}

/* Footer */
footer {
  padding-top: 1.5rem;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Blog Styles */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-post-preview {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-post-preview:hover {
  background-color: var(--background-hover);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.blog-post-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-post-date {
  font-size: 16px;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.blog-post-excerpt {
  line-height: 1.625;
}

/* Blog Content */
.blog-content {
  max-width: 65ch;
  line-height: 1.75;
}

.blog-content h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.blog-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.blog-content p {
  margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-top: 0.25rem;
}

.blog-content code {
  background-color: var(--muted);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.blog-content pre {
  background-color: var(--muted);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
}

.blog-content pre code {
  background-color: transparent;
  padding: 0;
}

/* Override highlight.js theme background to match site */
.blog-content pre code.hljs {
  background: transparent;
  padding: 0;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
  display: block;
}

.blog-content hr {
  border: none;
  height: 1.5px;
  background-color: var(--muted-foreground);
  margin: 2rem 0;
}

/* Sidebar Table of Contents */
.toc-sidebar {
  display: none;
}

@media (min-width: 1100px) {
  .toc-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    position: fixed;
    left: calc(50% + 340px);
    top: 10rem;
    width: 180px;
    font-size: 12px;
    line-height: 1.2;
    padding-left: 0.75rem;
    border-left: 1.5px solid var(--muted-foreground);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
  }

  .toc-sidebar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .toc-sidebar a {
    color: var(--muted-foreground);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
  }

  .toc-sidebar a:hover {
    color: var(--foreground);
    border-bottom-color: var(--foreground);
  }

  .toc-sidebar a.active {
    color: var(--foreground);
    font-weight: 600;
  }

  /* Adapt to font toggle */
  .toc-sidebar.serif {
    font-family: var(--font-serif-body);
  }
}

.blog-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* Tables */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.blog-content th,
.blog-content td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

.blog-content th {
  font-weight: 600;
}

.blog-content tr:last-child td {
  border-bottom: none;
}

/* Blog Font Toggle - Notion style with Ag preview */
.font-toggle-container {
  display: inline-flex;
  align-items: center;
  position: relative;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  padding: 0.25rem;
  gap: 0;
}

.font-toggle-indicator {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: calc(50% - 0.25rem);
  height: calc(100% - 0.5rem);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 0.375rem;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.font-toggle-container[data-font="serif"] .font-toggle-indicator {
  transform: translateX(100%);
}

.font-toggle-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 1.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.font-toggle-btn:hover {
  color: var(--foreground);
}

.font-toggle-btn[aria-checked="true"] {
  color: var(--foreground);
}

/* Serif mode for blog content */
.blog-content.serif {
  font-family: var(--font-serif-body);
  font-size: 17px;
  line-height: 1.8;
}

.blog-content.serif h1,
.blog-content.serif h2,
.blog-content.serif h3 {
  font-family: var(--font-serif-title);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--link);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.back-link:hover svg {
  transform: translateX(-3px);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Utility Classes */
.max-w-prose {
  max-width: 65ch;
}

.leading-relaxed {
  line-height: 1.625;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

/* Person row - name left, affiliation right */
.person-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

