/* CSS Design System for Personal Research Portfolio */
/* Recreates the styling from the original site without build dependencies */

:root {
  --background: #faf9f6;
  --foreground: #1a1a1a;
  --muted: #f0efe9;
  --muted-foreground: #6b6b66;
  --accent: #7a1f1f;
  --border: #e5e3db;
  --rule: #d8d6cc;
  
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Base Styles */
html {
  font-family: var(--font-serif);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  padding: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--foreground);
  margin-top: 0;
  margin-bottom: 0;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Layout Utilities */
.min-h-screen {
  min-height: 100vh;
}

.layout-wrapper {
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
}

/* Navigation logo & links */
.logo {
  color: var(--foreground) !important;
  text-decoration: none !important;
  font-family: var(--font-serif);
  font-size: 1.25rem; /* text-xl */
  font-weight: 500;
  letter-spacing: -0.025em; /* tracking-tight */
}

.nav-link {
  text-decoration: none !important;
  color: var(--accent) !important;
  font-size: 13px; /* text-[13px] */
}

.nav-link:hover,
.nav-link.active {
  color: var(--foreground) !important;
}

/* Spacing Utilities */
.mb-14 { margin-bottom: 3.5rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 0.75rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-1  { margin-bottom: 0.25rem; }
.pb-1  { padding-bottom: 0.25rem; }
.pb-2  { padding-bottom: 0.5rem; }
.pt-2  { padding-top: 0.5rem; }
.pt-6  { padding-top: 1.5rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-7 > * + * { margin-top: 1.75rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

/* Text Utilities */
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.text-muted-foreground { color: var(--muted-foreground); }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.text-\[12px\] { font-size: 12px; }
.text-\[13px\] { font-size: 13px; }
.text-\[14px\] { font-size: 14px; }
.text-\[14\.5px\] { font-size: 14.5px; }
.text-\[15px\] { font-size: 15px; }
.text-\[15\.5px\] { font-size: 15.5px; }
.text-\[19px\] { font-size: 19px; }
.text-\[20px\] { font-size: 20px; }
.text-\[26px\] { font-size: 26px; }
.text-\[28px\] { font-size: 28px; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }

/* Border rules & decorators */
.rule {
  border-bottom: 1px solid var(--rule);
}

.dotted-underline {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

/* Element wrappers */
.w-44 { width: 11rem; }
.h-44 { height: 11rem; }
.rounded-xl { border-radius: 0.75rem; }
.object-cover { object-fit: cover; }

/* Flex & Grid layouts */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.gap-x-5 { column-gap: 1.25rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-1 { row-gap: 0.25rem; }
.gap-y-2 { row-gap: 0.5rem; }
.ml-auto { margin-left: auto; }

.grid { display: grid; }
.grid-cols-\[130px_1fr\] { grid-template-columns: 130px 1fr; }

.list-disc { list-style-type: disc; }
.list-decimal { list-style-type: decimal; }
.pl-5 { padding-left: 1.25rem; }

/* CSS Reset and default overrides */
p {
  margin-top: 0;
  margin-bottom: 0;
}
ul, ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}
dl {
  margin: 0;
}
dt {
  font-weight: normal;
}
dd {
  margin-left: 0;
}
li {
  padding-left: 0;
}

/* Markdown Post Typography Styling */
.markdown-body p {
  margin-top: 1rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.markdown-body h1 { font-size: 1.5rem; }
.markdown-body h2 { font-size: 1.3rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.markdown-body h3 { font-size: 1.15rem; }
.markdown-body h4 { font-size: 1rem; }

.markdown-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.markdown-body ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.markdown-body li {
  margin-bottom: 0.4rem;
}

.markdown-body blockquote {
  margin: 1.25rem 0;
  padding: 0.5rem 1rem;
  color: var(--muted-foreground);
  border-left: 3px solid var(--accent);
  background: var(--muted);
  border-radius: 0 4px 4px 0;
}

.markdown-body p code,
.markdown-body li code {
  background-color: var(--muted);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.markdown-body pre {
  background-color: #1e1e1e !important;
  color: #d4d4d4;
  border: 1px solid #333333;
  padding: 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.9em;
  line-height: 1.5;
}

.markdown-body pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 1em !important;
}

.markdown-body .hljs {
  background: transparent !important;
}

.markdown-body .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem 0;
  margin: 1.5rem 0;
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
}
